]> git.decadent.org.uk Git - nfs-utils.git/blob - utils/rquotad/mntent.h
6c5845185a2463ae7c41a70d0e1cbd7cd1673966
[nfs-utils.git] / utils / rquotad / mntent.h
1 #ifndef _MNTENT_H
2 #define _MNTENT_H
3
4 #include <features.h>
5
6 #define MNTTAB "/etc/fstab"
7 #define MOUNTED "/etc/mtab"
8
9 #define MNTMAXSTR       512
10
11 #define MNTTYPE_COHERENT        "coherent"      /* Coherent file system */
12 #define MNTTYPE_EXT             "ext"           /* Extended file system */
13 #define MNTTYPE_EXT2            "ext2"          /* Second Extended file system */
14 #define MNTTYPE_HPFS            "hpfs"          /* OS/2's high performance file system */
15 #define MNTTYPE_ISO9660         "iso9660"       /* ISO CDROM file system */
16 #define MNTTYPE_MINIX           "minix"         /* MINIX file system */
17 #define MNTTYPE_MSDOS           "msdos"         /* MS-DOS file system */
18 #define MNTTYPE_SYSV            "sysv"          /* System V file system */
19 #define MNTTYPE_UMSDOS          "umsdos"        /* U MS-DOS file system */
20 #define MNTTYPE_XENIX           "xenix"         /* Xenix file system */
21 #define MNTTYPE_XIAFS           "xiafs"         /* Frank Xia's file system */
22 #define MNTTYPE_NFS             "nfs"           /* Network file system */
23 #define MNTTYPE_PROC            "proc"          /* Linux process file system */
24 #define MNTTYPE_IGNORE          "ignore"        /* Ignore this entry */
25 #define MNTTYPE_SWAP            "swap"          /* Swap device */
26
27 /* generic mount options */
28 #define MNTOPT_DEFAULTS         "defaults"      /* use all default opts */
29 #define MNTOPT_RO               "ro"            /* read only */
30 #define MNTOPT_RW               "rw"            /* read/write */
31 #define MNTOPT_SUID             "suid"          /* set uid allowed */
32 #define MNTOPT_NOSUID           "nosuid"        /* no set uid allowed */
33 #define MNTOPT_NOAUTO           "noauto"        /* don't auto mount */
34
35 /* ext2 and msdos options */
36 #define MNTOPT_CHECK            "check"         /* filesystem check level */
37
38 /* ext2 specific options */
39 #define MNTOPT_BSDDF            "bsddf"         /* disable MINIX compatibility disk free counting */
40 #define MNTOPT_BSDGROUPS        "bsdgroups"     /* set BSD group usage */
41 #define MNTOPT_ERRORS           "errors"        /* set behaviour on error */
42 #define MNTOPT_GRPID            "grpid"         /* set BSD group usage */
43 #define MNTOPT_MINIXDF          "minixdf"       /* enable MINIX compatibility disk free counting */
44 #define MNTOPT_NOCHECK          "nocheck"       /* reset filesystem checks */
45 #define MNTOPT_NOGRPID          "nogrpid"       /* set SYSV group usage */
46 #define MNTOPT_RESGID           "resgid"        /* group to consider like root for reserved blocks */
47 #define MNTOPT_RESUID           "resuid"        /* user to consider like root for reserved blocks */
48 #define MNTOPT_SB               "sb"            /* set used super block */
49 #define MNTOPT_SYSVGROUPS       "sysvgroups"    /* set SYSV group usage */
50
51 /* options common to hpfs, isofs, and msdos */
52 #define MNTOPT_CONV             "conv"          /* convert specified types of data */
53 #define MNTOPT_GID              "gid"           /* use given gid */
54 #define MNTOPT_UID              "uid"           /* use given uid */
55 #define MNTOPT_UMASK            "umask"         /* use given umask, not isofs */
56
57 /* hpfs specific options */
58 #define MNTOPT_CASE             "case"          /* case conversation */
59
60 /* isofs specific options */
61 #define MNTOPT_BLOCK            "block"         /* use given block size */
62 #define MNTOPT_CRUFT            "cruft"         /* ??? */
63 #define MNTOPT_MAP              "map"           /* ??? */
64 #define MNTOPT_NOROCK           "norock"        /* not rockwell format ??? */
65
66 /* msdos specific options */
67 #define MNTOPT_FAT              "fat"           /* set FAT size */
68 #define MNTOPT_QUIET            "quiet"         /* ??? */
69
70 /* swap specific options */
71
72 /* options common to ext, ext2, minix, xiafs, sysv, xenix, coherent */
73 #define MNTOPT_NOQUOTA          "noquota"       /* don't use any quota on this partition */
74 #define MNTOPT_USRQUOTA         "usrquota"      /* use userquota on this partition */
75 #define MNTOPT_GRPQUOTA         "grpquota"      /* use groupquota on this partition */
76 #define MNTOPT_RSQUASH          "rsquash"       /* threat root as an ordinary user */
77
78 /* none defined yet */
79
80 __BEGIN_DECLS
81
82 struct mntent{
83         char *mnt_fsname;
84         char *mnt_dir;
85         char *mnt_type;
86         char *mnt_opts;
87         int  mnt_freq;
88         int  mnt_passno;
89 };
90
91 __END_DECLS
92
93 #define __need_file
94 #include <stdio.h>
95
96 __BEGIN_DECLS
97
98 extern FILE     *setmntent __P ((__const char *__filep,
99                         __const char *__type));
100 extern struct mntent
101                 *getmntent __P ((FILE *__filep));
102 extern int      addmntent __P ((FILE *__filep,
103                         __const struct mntent *__mnt));
104 extern char     *hasmntopt __P ((__const struct mntent *__mnt,
105                         __const char *__opt));
106 extern int      endmntent __P ((FILE *__filep));
107
108 extern int      hasquota __P ((struct mntent *, int, char **));
109
110 __END_DECLS
111
112 #endif /* _MNTENT_H */