From c06fe0a05e6348d700e4941d30aadcdacef5d829 Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Tue, 11 Mar 1997 12:28:00 +0000 Subject: 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! --- sbin/mount_ifs/getmntopts.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'sbin/mount_ifs/getmntopts.c') 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 @@ -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); } } -- cgit v1.2.3