aboutsummaryrefslogtreecommitdiff
path: root/sbin/mount_ifs/getmntopts.c
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>1997-03-11 12:28:00 +0000
committerPeter Wemm <peter@FreeBSD.org>1997-03-11 12:28:00 +0000
commitc06fe0a05e6348d700e4941d30aadcdacef5d829 (patch)
treef705d4552806debc8fb516ed868872bafc3e0ddd /sbin/mount_ifs/getmntopts.c
parente7b6972097226a9eea20da0477d0147a9d5d5e3e (diff)
downloadsrc-c06fe0a05e6348d700e4941d30aadcdacef5d829.tar.gz
src-c06fe0a05e6348d700e4941d30aadcdacef5d829.zip
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!
Notes
Notes: svn path=/head/; revision=23678
Diffstat (limited to 'sbin/mount_ifs/getmntopts.c')
-rw-r--r--sbin/mount_ifs/getmntopts.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/sbin/mount_ifs/getmntopts.c b/sbin/mount_ifs/getmntopts.c
index 75c75b202416..583d154f4793 100644
--- a/sbin/mount_ifs/getmntopts.c
+++ b/sbin/mount_ifs/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);
}
}