summaryrefslogtreecommitdiffstats
path: root/sbin/mount/getmntopts.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1997-03-11 12:28:00 +0000
committerpeter <peter@FreeBSD.org>1997-03-11 12:28:00 +0000
commit2feef020b355ece983a669243a95d099367b171c (patch)
tree9839b9610f8f5ce97f93c3d8c197a93fc61d2c61 /sbin/mount/getmntopts.c
parentd2924d1b179ce176f260d3d1bc75c9cc4ea6262e (diff)
downloadFreeBSD-src-2feef020b355ece983a669243a95d099367b171c.zip
FreeBSD-src-2feef020b355ece983a669243a95d099367b171c.tar.gz
Merge from Lite2
- use new getvfsbyname() interface and mount(2) interface **DANGER WILL ROBINSON!!** You must be running a -current kernel from within a week or so in order for this to work!
Diffstat (limited to 'sbin/mount/getmntopts.c')
-rw-r--r--sbin/mount/getmntopts.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/sbin/mount/getmntopts.c b/sbin/mount/getmntopts.c
index 75c75b2..583d154 100644
--- a/sbin/mount/getmntopts.c
+++ b/sbin/mount/getmntopts.c
@@ -32,7 +32,7 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)getmntopts.c 8.1 (Berkeley) 3/27/94";
+static char sccsid[] = "@(#)getmntopts.c 8.3 (Berkeley) 3/29/95";
#endif /* not lint */
#include <sys/param.h>
@@ -57,7 +57,7 @@ getmntopts(options, m0, flagp, altflagp)
{
const struct mntopt *m;
int negative, len;
- char *opt, *optbuf;
+ char *opt, *optbuf, *p;
int *thisflagp;
/* Copy option string, since it is about to be torn asunder... */
@@ -72,6 +72,14 @@ getmntopts(options, m0, flagp, altflagp)
} else
negative = 0;
+ /*
+ * for options with assignments in them (ie. quotas)
+ * ignore the assignment as it's handled elsewhere
+ */
+ p = strchr(opt, '=');
+ if (p)
+ *p = '\0';
+
/* Scan option table. */
for (m = m0; m->m_option != NULL; ++m) {
len = strlen(m->m_option);
@@ -89,7 +97,7 @@ getmntopts(options, m0, flagp, altflagp)
*thisflagp |= m->m_flag;
else
*thisflagp &= ~m->m_flag;
- } else if(!getmnt_silent) {
+ } else if (!getmnt_silent) {
errx(1, "-o %s: option not supported", opt);
}
}
OpenPOWER on IntegriCloud