summaryrefslogtreecommitdiffstats
path: root/sbin/mount/getmntopts.3
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>1994-11-01 23:51:53 +0000
committerwollman <wollman@FreeBSD.org>1994-11-01 23:51:53 +0000
commitf22ba017a05b76c7d6527ba987fe81cdef085ced (patch)
treef614541c69f463075bbc04969273cb64b172d603 /sbin/mount/getmntopts.3
parent4d89ead91e74e5a8e60f0f16733d9d8c15d82542 (diff)
downloadFreeBSD-src-f22ba017a05b76c7d6527ba987fe81cdef085ced.zip
FreeBSD-src-f22ba017a05b76c7d6527ba987fe81cdef085ced.tar.gz
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!)
Diffstat (limited to 'sbin/mount/getmntopts.3')
-rw-r--r--sbin/mount/getmntopts.315
1 files changed, 13 insertions, 2 deletions
diff --git a/sbin/mount/getmntopts.3 b/sbin/mount/getmntopts.3
index 642c57a..c1bd25a 100644
--- a/sbin/mount/getmntopts.3
+++ b/sbin/mount/getmntopts.3
@@ -40,7 +40,7 @@
.Sh SYNOPSIS
.Fd #include <mntopts.h>
.Ft void
-.Fn getmntopts "char *options" "struct mntopt *mopts" "int *flagp"
+.Fn getmntopts "char *options" "struct mntopt *mopts" "int *flagp" "int *altflagp"
.Sh DESCRIPTION
The
.Nm getmntopts
@@ -54,8 +54,13 @@ is broken down into a sequence of comma separated tokens.
Each token is looked up in the table described by
.Dv mopts
and the bits in
-the word referenced by
+the word referenced by either
.Dv flagp
+or
+.Dv altflagp
+(depending on the
+.Dv m_altloc
+field of the option's table entry)
are updated.
The flag word is not initialized by
.Nm getmntopt .
@@ -67,6 +72,7 @@ struct mntopt {
char *m_option; /* option name */
int m_inverse; /* is this a negative option, eg "dev" */
int m_flag; /* bit to set, eg MNT_RDONLY */
+ int m_altloc; /* non-zero to use altflagp rather than flagp */
};
.Ed
.Pp
@@ -100,6 +106,11 @@ by the letters
The
.Dv m_inverse
flag causes these two operations to be reversed.
+.It Fa m_altloc
+the bit should be set or cleared in
+.Dv altflagp
+rather than
+.Dv flagp .
.El
.Pp
Each of the user visible
OpenPOWER on IntegriCloud