date and time created 94/03/27 08:07:56 by bostic
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Sun, 27 Mar 1994 23:07:56 +0000 (15:07 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Sun, 27 Mar 1994 23:07:56 +0000 (15:07 -0800)
SCCS-vsn: sbin/mount/mntopts.h 8.1

usr/src/sbin/mount/mntopts.h [new file with mode: 0644]

diff --git a/usr/src/sbin/mount/mntopts.h b/usr/src/sbin/mount/mntopts.h
new file mode 100644 (file)
index 0000000..43155a6
--- /dev/null
@@ -0,0 +1,46 @@
+/*-
+ * Copyright (c) 1994
+ *      The Regents of the University of California.  All rights reserved.
+ *
+ * %sccs.include.redist.c%
+ *
+ *     @(#)mntopts.h   8.1 (Berkeley) %G%
+ */
+
+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 */
+};
+
+/* 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_SYNCHRONOUS       { "synchronous", 0, MNT_SYNCHRONOUS }
+#define MOPT_UNION             { "union",       0, MNT_UNION }
+
+/* Control flags. */
+#define MOPT_FORCE             { "exec",        1, MNT_FORCE }
+#define MOPT_UPDATE            { "update",      0, MNT_UPDATE }
+
+/* Support for old-style "ro", "rw" flags. */
+#define MOPT_RO                        { "ro",          0, MNT_RDONLY }
+#define MOPT_RW                        { "rw",          1, MNT_RDONLY }
+
+#define MOPT_FSTAB_COMPAT                                              \
+       MOPT_RO,                                                        \
+       MOPT_RW
+
+/* Standard options which all mounts can understand. */
+#define MOPT_STDOPTS                                                   \
+       MOPT_FSTAB_COMPAT,                                              \
+       MOPT_NODEV,                                                     \
+       MOPT_NOEXEC,                                                    \
+       MOPT_NOSUID,                                                    \
+       MOPT_RDONLY,                                                    \
+       MOPT_UNION
+
+void getmntopts __P((const char *, const struct mntopt *, int *));