summaryrefslogtreecommitdiff
path: root/sbin/mount/getmntopts.c
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2004-07-05 18:33:39 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2004-07-05 18:33:39 +0000
commit4eb2af6569228a4b2b84c10922ff2f1b3a6dc328 (patch)
tree3b28b65fdd2d22e3be1a79bfffada54ea4ea2dc9 /sbin/mount/getmntopts.c
parent4335c644e6bae68c48074b1e650afdcb454fdaf9 (diff)
userquota and groupquota _optionally_ have a value.
ok pedro@ millert@
Diffstat (limited to 'sbin/mount/getmntopts.c')
-rw-r--r--sbin/mount/getmntopts.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/mount/getmntopts.c b/sbin/mount/getmntopts.c
index cd51786a87b..e6481539fdd 100644
--- a/sbin/mount/getmntopts.c
+++ b/sbin/mount/getmntopts.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: getmntopts.c,v 1.8 2004/06/22 21:12:00 otto Exp $ */
+/* $OpenBSD: getmntopts.c,v 1.9 2004/07/05 18:33:38 otto Exp $ */
/* $NetBSD: getmntopts.c,v 1.3 1995/03/18 14:56:58 cgd Exp $ */
/*-
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)getmntopts.c 8.1 (Berkeley) 3/27/94";
#else
-static char rcsid[] = "$OpenBSD: getmntopts.c,v 1.8 2004/06/22 21:12:00 otto Exp $";
+static char rcsid[] = "$OpenBSD: getmntopts.c,v 1.9 2004/07/05 18:33:38 otto Exp $";
#endif
#endif /* not lint */
@@ -101,7 +101,7 @@ getmntopt(char **optionp, union mntval *valuep, const struct mntopt *m0,
/* Save flag, or fail if option is not recognised. */
if (m->m_option) {
needval = (m->m_oflags & (MFLAG_INTVAL|MFLAG_STRVAL)) != 0;
- if (needval != (value != NULL))
+ if (needval != (value != NULL) && !(m->m_oflags & MFLAG_OPT))
errx(1, "-o %s: option %s a value", opt,
needval ? "needs" : "does not need");
inverse = (m->m_oflags & MFLAG_INVERSE) ? 1 : 0;