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>
*
*/
+#ifndef _NFS_UTILS_MOUNT_ERROR_H
+#define _NFS_UTILS_MOUNT_ERROR_H
+
char *nfs_strerror(int);
void mount_error(const char *, const char *, int);
void sys_mount_errors(char *, int, int, int);
void umount_error(int, const char *);
+
+#endif /* _NFS_UTILS_MOUNT_ERROR_H */
-#ifndef _NFS_FSTAB_H
-#define _NFS_FSTAB_H
+#ifndef _NFS_UTILS_MOUNT_FSTAB_H
+#define _NFS_UTILS_MOUNT_FSTAB_H
#include "nfs_mntent.h"
void unlock_mtab (void);
void update_mtab (const char *special, struct mntent *with);
-#endif /* _NFS_FSTAB_H */
-
+#endif /* _NFS_UTILS_MOUNT_FSTAB_H */
-#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 */
#define MS_MGC_MSK 0xffff0000 /* magic flag number mask */
#endif
-#endif /* _NFS_MOUNT_CONSTANTS_H */
+#endif /* _NFS_UTILS_MOUNT_CONSTANTS_H */
*
*/
+#ifndef _NFS_UTILS_MOUNT_NETWORK_H
+#define _NFS_UTILS_MOUNT_NETWORK_H
+
#include <rpc/pmap_prot.h>
#include <rpc/clnt.h>
CLIENT *mnt_openclnt(clnt_addr_t *, int *);
void mnt_closeclnt(CLIENT *, int);
+
+#endif /* _NFS_UTILS_MOUNT_NETWORK_H */
* 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>
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 */
*
*/
+#ifndef _NFS_UTILS_PARSE_OPT_H
+#define _NFS_UTILS_PARSE_OPT_H
+
typedef enum {
PO_FAILED = 0,
PO_SUCCEEDED = 1,
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 */
*
*/
+#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 */
*
*/
+#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 */