mntopts.h (18007) | mntopts.h (23678) |
---|---|
1/*- 2 * Copyright (c) 1994 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 16 unchanged lines hidden (view full) --- 25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * | 1/*- 2 * Copyright (c) 1994 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 16 unchanged lines hidden (view full) --- 25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * |
33 * @(#)mntopts.h 8.3 (Berkeley) 3/27/94 | 33 * @(#)mntopts.h 8.7 (Berkeley) 3/29/95 |
34 */ 35 36struct mntopt { 37 const char *m_option; /* option name */ 38 int m_inverse; /* if a negative option, eg "dev" */ 39 int m_flag; /* bit to set, eg. MNT_RDONLY */ | 34 */ 35 36struct mntopt { 37 const char *m_option; /* option name */ 38 int m_inverse; /* if a negative option, eg "dev" */ 39 int m_flag; /* bit to set, eg. MNT_RDONLY */ |
40 int m_altloc; /* zero if this is a real mount flag */ | 40 int m_altloc; /* 1 => set bit in altflags */ |
41}; 42 43/* User-visible MNT_ flags. */ 44#define MOPT_ASYNC { "async", 0, MNT_ASYNC, 0 } 45#define MOPT_NOATIME { "atime", 1, MNT_NOATIME, 0 } | 41}; 42 43/* User-visible MNT_ flags. */ 44#define MOPT_ASYNC { "async", 0, MNT_ASYNC, 0 } 45#define MOPT_NOATIME { "atime", 1, MNT_NOATIME, 0 } |
46#define MOPT_NOAUTO { "auto", 1, 0, 0 } | |
47#define MOPT_NODEV { "dev", 1, MNT_NODEV, 0 } 48#define MOPT_NOEXEC { "exec", 1, MNT_NOEXEC, 0 } 49#define MOPT_NOSUID { "suid", 1, MNT_NOSUID, 0 } 50#define MOPT_RDONLY { "rdonly", 0, MNT_RDONLY, 0 } 51#define MOPT_SYNC { "sync", 0, MNT_SYNCHRONOUS, 0 } 52#define MOPT_UNION { "union", 0, MNT_UNION, 0 } | 46#define MOPT_NODEV { "dev", 1, MNT_NODEV, 0 } 47#define MOPT_NOEXEC { "exec", 1, MNT_NOEXEC, 0 } 48#define MOPT_NOSUID { "suid", 1, MNT_NOSUID, 0 } 49#define MOPT_RDONLY { "rdonly", 0, MNT_RDONLY, 0 } 50#define MOPT_SYNC { "sync", 0, MNT_SYNCHRONOUS, 0 } 51#define MOPT_UNION { "union", 0, MNT_UNION, 0 } |
52#define MOPT_USERQUOTA { "userquota", 0, 0, 0 } 53#define MOPT_GROUPQUOTA { "groupquota", 0, 0, 0 } |
|
53 | 54 |
54/* Skip this options without any action (needed for checkquota/quotaon) */ 55#define MOPT_UQUOTA { "userquota", 0, 0, 0 } 56#define MOPT_GQUOTA { "groupquota", 0, 0, 0 } 57 | |
58/* Control flags. */ 59#define MOPT_FORCE { "force", 0, MNT_FORCE, 0 } 60#define MOPT_UPDATE { "update", 0, MNT_UPDATE, 0 } | 55/* Control flags. */ 56#define MOPT_FORCE { "force", 0, MNT_FORCE, 0 } 57#define MOPT_UPDATE { "update", 0, MNT_UPDATE, 0 } |
61 62/* Support for old-style "ro", "rw" flags. */ | |
63#define MOPT_RO { "ro", 0, MNT_RDONLY, 0 } 64#define MOPT_RW { "rw", 1, MNT_RDONLY, 0 } 65 | 58#define MOPT_RO { "ro", 0, MNT_RDONLY, 0 } 59#define MOPT_RW { "rw", 1, MNT_RDONLY, 0 } 60 |
61/* This is parsed by mount(8), but is ignored by specific mount_*(8)s. */ 62#define MOPT_AUTO { "auto", 0, 0, 0 } 63 |
|
66#define MOPT_FSTAB_COMPAT \ 67 MOPT_RO, \ | 64#define MOPT_FSTAB_COMPAT \ 65 MOPT_RO, \ |
68 MOPT_RW | 66 MOPT_RW, \ 67 MOPT_AUTO |
69 70/* Standard options which all mounts can understand. */ 71#define MOPT_STDOPTS \ | 68 69/* Standard options which all mounts can understand. */ 70#define MOPT_STDOPTS \ |
71 MOPT_USERQUOTA, \ 72 MOPT_GROUPQUOTA, \ |
|
72 MOPT_FSTAB_COMPAT, \ 73 MOPT_NOATIME, \ | 73 MOPT_FSTAB_COMPAT, \ 74 MOPT_NOATIME, \ |
74 MOPT_NOAUTO, \ | |
75 MOPT_NODEV, \ 76 MOPT_NOEXEC, \ 77 MOPT_NOSUID, \ 78 MOPT_RDONLY, \ 79 MOPT_UNION 80 81void getmntopts __P((const char *, const struct mntopt *, int *, int *)); 82extern int getmnt_silent; | 75 MOPT_NODEV, \ 76 MOPT_NOEXEC, \ 77 MOPT_NOSUID, \ 78 MOPT_RDONLY, \ 79 MOPT_UNION 80 81void getmntopts __P((const char *, const struct mntopt *, int *, int *)); 82extern int getmnt_silent; |