]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
Clean up: add the traditional pre-processor safety check in headers under
authorChuck Lever <chuck.lever@oracle.com>
Tue, 15 Jul 2008 16:13:10 +0000 (12:13 -0400)
committerSteve Dickson <steved@redhat.com>
Tue, 15 Jul 2008 16:13:10 +0000 (12:13 -0400)
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>
utils/mount/error.h
utils/mount/fstab.h
utils/mount/mount_constants.h
utils/mount/network.h
utils/mount/nfs_mount.h
utils/mount/parse_opt.h
utils/mount/stropts.h
utils/mount/token.h

index 8b8e9ae40ca8295cb7fe0598058555bdad04e1ef..7126de531d5bec05079154f09478faca8f4d4beb 100644 (file)
@@ -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);
 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 *);
 void sys_mount_errors(char *, int, int, int);
 
 void umount_error(int, const char *);
+
+#endif /* _NFS_UTILS_MOUNT_ERROR_H */
index 0b81accae01399b2fbff543af6a4d09b124ae7e7..dc7c9fc8d73bdc854e78c5c87a68dbb76e71445d 100644 (file)
@@ -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"
 
 
 #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);
 
 void unlock_mtab (void);
 void update_mtab (const char *special, struct mntent *with);
 
-#endif /* _NFS_FSTAB_H */
-
+#endif /* _NFS_UTILS_MOUNT_FSTAB_H */
index 4f3c729d8738128faf20eb68a733f017f74ec815..cbfb099df99a0458fcd12ff0d180573a78814bdf 100644 (file)
@@ -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 */
 
 #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
 
 #define MS_MGC_MSK 0xffff0000  /* magic flag number mask */
 #endif
 
-#endif /* _NFS_MOUNT_CONSTANTS_H */
+#endif /* _NFS_UTILS_MOUNT_CONSTANTS_H */
index 70a91af88e9aef3095038a8d3c9da4246f7c9d42..9de13b50a99ecf146638a89f5e53e8031aea9ec7 100644 (file)
@@ -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>
 
 #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);
 
 CLIENT *mnt_openclnt(clnt_addr_t *, int *);
 void mnt_closeclnt(CLIENT *, int);
+
+#endif /* _NFS_UTILS_MOUNT_NETWORK_H */
index 7df8fb262f97f7925a4839bd99ce10f9226c7f89..2becfb1a0d655093385f47571b026124218fcf46 100644 (file)
@@ -8,8 +8,8 @@
  * so it is easiest to ignore the kernel altogether (at compile time).
  */
 
  * 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>
 
 #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 **);
 
 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 */
index e7924ddf078ade1c0c337c00f96d66f468b89973..fb003c3030a8839200bb03e0b1e808b8b03a55a0 100644 (file)
@@ -21,6 +21,9 @@
  *
  */
 
  *
  */
 
+#ifndef _NFS_UTILS_PARSE_OPT_H
+#define _NFS_UTILS_PARSE_OPT_H
+
 typedef enum {
        PO_FAILED = 0,
        PO_SUCCEEDED = 1,
 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 *);
 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 */
index b926d688612675d7eec70c67e620994b7f00c0de..b4fd88878d088e30aa0020c5c975092e648a0006 100644 (file)
  *
  */
 
  *
  */
 
+#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);
 int nfsmount_string(const char *, const char *, const char *, int,
                        char **, int, int);
+
+#endif /* _NFS_UTILS_MOUNT_STROPTS_H */
index 47762dc4d3e5680e347375a0f4c37d7c53c826d9..5a675ed0f62d66ce66c8d61134d4fad241597e5c 100644 (file)
  *
  */
 
  *
  */
 
+#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 *);
 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 */