summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2008-07-15 12:13:10 -0400
committerSteve Dickson <steved@redhat.com>2008-07-15 12:13:10 -0400
commit1ca49510fd1742955330583f259db7faf501a5e5 (patch)
tree4d7a0d391f564ce136db36b352cf942f393a5fa9
parentd5a09b59916d4ef24b15e34eac394149cb7a641a (diff)
downloadnfs-utils-1ca49510fd1742955330583f259db7faf501a5e5.tar.gz
nfs-utils-1ca49510fd1742955330583f259db7faf501a5e5.tar.xz
nfs-utils-1ca49510fd1742955330583f259db7faf501a5e5.zip
Clean up: add the traditional pre-processor safety check in headers under
utils/mount to prevent them from being included multiple times. For headers that already have this, use a more unique macro name to reduce the probability that some other header may use the same macro. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
-rw-r--r--utils/mount/error.h5
-rw-r--r--utils/mount/fstab.h7
-rw-r--r--utils/mount/mount_constants.h6
-rw-r--r--utils/mount/network.h5
-rw-r--r--utils/mount/nfs_mount.h6
-rw-r--r--utils/mount/parse_opt.h5
-rw-r--r--utils/mount/stropts.h5
-rw-r--r--utils/mount/token.h5
8 files changed, 34 insertions, 10 deletions
diff --git a/utils/mount/error.h b/utils/mount/error.h
index 8b8e9ae..7126de5 100644
--- a/utils/mount/error.h
+++ b/utils/mount/error.h
@@ -21,6 +21,9 @@
*
*/
+#ifndef _NFS_UTILS_MOUNT_ERROR_H
+#define _NFS_UTILS_MOUNT_ERROR_H
+
char *nfs_strerror(int);
void mount_error(const char *, const char *, int);
@@ -28,3 +31,5 @@ void rpc_mount_errors(char *, int, int);
void sys_mount_errors(char *, int, int, int);
void umount_error(int, const char *);
+
+#endif /* _NFS_UTILS_MOUNT_ERROR_H */
diff --git a/utils/mount/fstab.h b/utils/mount/fstab.h
index 0b81acc..dc7c9fc 100644
--- a/utils/mount/fstab.h
+++ b/utils/mount/fstab.h
@@ -1,5 +1,5 @@
-#ifndef _NFS_FSTAB_H
-#define _NFS_FSTAB_H
+#ifndef _NFS_UTILS_MOUNT_FSTAB_H
+#define _NFS_UTILS_MOUNT_FSTAB_H
#include "nfs_mntent.h"
@@ -27,5 +27,4 @@ void lock_mtab (void);
void unlock_mtab (void);
void update_mtab (const char *special, struct mntent *with);
-#endif /* _NFS_FSTAB_H */
-
+#endif /* _NFS_UTILS_MOUNT_FSTAB_H */
diff --git a/utils/mount/mount_constants.h b/utils/mount/mount_constants.h
index 4f3c729..cbfb099 100644
--- a/utils/mount/mount_constants.h
+++ b/utils/mount/mount_constants.h
@@ -1,5 +1,5 @@
-#ifndef _NFS_MOUNT_CONSTANTS_H
-#define _NFS_MOUNT_CONSTANTS_H
+#ifndef _NFS_UTILS_MOUNT_CONSTANTS_H
+#define _NFS_UTILS_MOUNT_CONSTANTS_H
#ifndef MS_DIRSYNC
#define MS_DIRSYNC 128 /* Directory modifications are synchronous */
@@ -64,4 +64,4 @@ if we have a stack or plain mount - mount atop of it, forming a stack. */
#define MS_MGC_MSK 0xffff0000 /* magic flag number mask */
#endif
-#endif /* _NFS_MOUNT_CONSTANTS_H */
+#endif /* _NFS_UTILS_MOUNT_CONSTANTS_H */
diff --git a/utils/mount/network.h b/utils/mount/network.h
index 70a91af..9de13b5 100644
--- a/utils/mount/network.h
+++ b/utils/mount/network.h
@@ -21,6 +21,9 @@
*
*/
+#ifndef _NFS_UTILS_MOUNT_NETWORK_H
+#define _NFS_UTILS_MOUNT_NETWORK_H
+
#include <rpc/pmap_prot.h>
#include <rpc/clnt.h>
@@ -62,3 +65,5 @@ unsigned long nfsvers_to_mnt(const unsigned long);
CLIENT *mnt_openclnt(clnt_addr_t *, int *);
void mnt_closeclnt(CLIENT *, int);
+
+#endif /* _NFS_UTILS_MOUNT_NETWORK_H */
diff --git a/utils/mount/nfs_mount.h b/utils/mount/nfs_mount.h
index 7df8fb2..2becfb1 100644
--- a/utils/mount/nfs_mount.h
+++ b/utils/mount/nfs_mount.h
@@ -8,8 +8,8 @@
* so it is easiest to ignore the kernel altogether (at compile time).
*/
-#ifndef _NFS_MOUNT_H
-#define _NFS_MOUNT_H
+#ifndef _NFS_UTILS_MOUNT_NFS_MOUNT_H
+#define _NFS_UTILS_MOUNT_NFS_MOUNT_H
#include <netinet/in.h>
#include <arpa/inet.h>
@@ -83,4 +83,4 @@ struct nfs_mount_data {
int nfsmount(const char *, const char *, int , char **, int, int);
int nfsumount(int, char **);
-#endif /* _NFS_MOUNT_H */
+#endif /* _NFS_UTILS_MOUNT_NFS_MOUNT_H */
diff --git a/utils/mount/parse_opt.h b/utils/mount/parse_opt.h
index e7924dd..fb003c3 100644
--- a/utils/mount/parse_opt.h
+++ b/utils/mount/parse_opt.h
@@ -21,6 +21,9 @@
*
*/
+#ifndef _NFS_UTILS_PARSE_OPT_H
+#define _NFS_UTILS_PARSE_OPT_H
+
typedef enum {
PO_FAILED = 0,
PO_SUCCEEDED = 1,
@@ -50,3 +53,5 @@ char * po_get(struct mount_options *, char *);
po_rightmost_t po_rightmost(struct mount_options *, char *, char *);
po_found_t po_remove_all(struct mount_options *, char *);
void po_destroy(struct mount_options *);
+
+#endif /* _NFS_UTILS_PARSE_OPT_H */
diff --git a/utils/mount/stropts.h b/utils/mount/stropts.h
index b926d68..b4fd888 100644
--- a/utils/mount/stropts.h
+++ b/utils/mount/stropts.h
@@ -21,5 +21,10 @@
*
*/
+#ifndef _NFS_UTILS_MOUNT_STROPTS_H
+#define _NFS_UTILS_MOUNT_STROPTS_H
+
int nfsmount_string(const char *, const char *, const char *, int,
char **, int, int);
+
+#endif /* _NFS_UTILS_MOUNT_STROPTS_H */
diff --git a/utils/mount/token.h b/utils/mount/token.h
index 47762dc..5a675ed 100644
--- a/utils/mount/token.h
+++ b/utils/mount/token.h
@@ -21,9 +21,14 @@
*
*/
+#ifndef _NFS_UTILS_MOUNT_TOKEN_H
+#define _NFS_UTILS_MOUNT_TOKEN_H
+
struct tokenizer_state;
char *next_token(struct tokenizer_state *);
struct tokenizer_state *init_tokenizer(char *, char);
int tokenizer_error(struct tokenizer_state *);
void end_tokenizer(struct tokenizer_state *);
+
+#endif /* _NFS_UTILS_MOUNT_TOKEN_H */