aboutsummaryrefslogtreecommitdiff
path: root/sbin/mount/mntopts.h
diff options
context:
space:
mode:
authorGarrett Wollman <wollman@FreeBSD.org>1994-11-01 23:51:53 +0000
committerGarrett Wollman <wollman@FreeBSD.org>1994-11-01 23:51:53 +0000
commit3fa88dec7f907cbcfee54e5ebebc001a3279fe30 (patch)
treef614541c69f463075bbc04969273cb64b172d603 /sbin/mount/mntopts.h
parentf23c6e08dfc2a3411b55e1b7a6a916bde7c5862d (diff)
downloadsrc-3fa88dec7f907cbcfee54e5ebebc001a3279fe30.tar.gz
src-3fa88dec7f907cbcfee54e5ebebc001a3279fe30.zip
Add support for filesystem-specific `-o' options, and re-implement the
most common cd9660 and nfs options like God intended them. (It is now possible to say mount -o ro,soft,bg,intr there:/foo/bar /foo/bar again.) This whole getmntopt() business is an incredible botch; it never should have been anything more than a wrapper around getsubopt(3). Because if the way the current hackaround is implemented, options which take arguments (like the old `rsize' and `wsize') are still unavailable, and must be accessed the new, broken way. (It's unimaginable how Berkeley managed to screw up one of the few things about NFS that Sun actually got right to begin with!)
Notes
Notes: svn path=/head/; revision=4065
Diffstat (limited to 'sbin/mount/mntopts.h')
-rw-r--r--sbin/mount/mntopts.h30
1 files changed, 16 insertions, 14 deletions
diff --git a/sbin/mount/mntopts.h b/sbin/mount/mntopts.h
index ec2c6d0ce40f..ba792fa691b8 100644
--- a/sbin/mount/mntopts.h
+++ b/sbin/mount/mntopts.h
@@ -37,28 +37,29 @@ struct mntopt {
const char *m_option; /* option name */
int m_inverse; /* if a negative option, eg "dev" */
int m_flag; /* bit to set, eg. MNT_RDONLY */
+ int m_altloc; /* zero if this is a real mount flag */
};
/* User-visible MNT_ flags. */
-#define MOPT_ASYNC { "async", 0, MNT_ASYNC }
-#define MOPT_NODEV { "dev", 1, MNT_NODEV }
-#define MOPT_NOEXEC { "exec", 1, MNT_NOEXEC }
-#define MOPT_NOSUID { "suid", 1, MNT_NOSUID }
-#define MOPT_RDONLY { "rdonly", 0, MNT_RDONLY }
-#define MOPT_SYNC { "sync", 0, MNT_SYNCHRONOUS }
-#define MOPT_UNION { "union", 0, MNT_UNION }
+#define MOPT_ASYNC { "async", 0, MNT_ASYNC, 0 }
+#define MOPT_NODEV { "dev", 1, MNT_NODEV, 0 }
+#define MOPT_NOEXEC { "exec", 1, MNT_NOEXEC, 0 }
+#define MOPT_NOSUID { "suid", 1, MNT_NOSUID, 0 }
+#define MOPT_RDONLY { "rdonly", 0, MNT_RDONLY, 0 }
+#define MOPT_SYNC { "sync", 0, MNT_SYNCHRONOUS, 0 }
+#define MOPT_UNION { "union", 0, MNT_UNION, 0 }
/* Skip this options without any action (needed for checkquota/quotaon) */
-#define MOPT_UQUOTA { "userquota", 0, 0 }
-#define MOPT_GQUOTA { "groupquota", 0, 0 }
+#define MOPT_UQUOTA { "userquota", 0, 0, 0 }
+#define MOPT_GQUOTA { "groupquota", 0, 0, 0 }
/* Control flags. */
-#define MOPT_FORCE { "force", 1, MNT_FORCE }
-#define MOPT_UPDATE { "update", 0, MNT_UPDATE }
+#define MOPT_FORCE { "force", 1, MNT_FORCE, 0 }
+#define MOPT_UPDATE { "update", 0, MNT_UPDATE, 0 }
/* Support for old-style "ro", "rw" flags. */
-#define MOPT_RO { "ro", 0, MNT_RDONLY }
-#define MOPT_RW { "rw", 1, MNT_RDONLY }
+#define MOPT_RO { "ro", 0, MNT_RDONLY, 0 }
+#define MOPT_RW { "rw", 1, MNT_RDONLY, 0 }
#define MOPT_FSTAB_COMPAT \
MOPT_RO, \
@@ -73,4 +74,5 @@ struct mntopt {
MOPT_RDONLY, \
MOPT_UNION
-void getmntopts __P((const char *, const struct mntopt *, int *));
+void getmntopts __P((const char *, const struct mntopt *, int *, int *));
+extern int getmnt_silent;