aboutsummaryrefslogtreecommitdiff
path: root/sbin/mount_ifs/getmntopts.c
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>1994-09-29 16:39:26 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>1994-09-29 16:39:26 +0000
commit0fd4e043f4dac8d72a9e5460ba8e852535ae7421 (patch)
treed76cec2ae1bfe7555ea17013845af2901b603f3e /sbin/mount_ifs/getmntopts.c
parente4b1dc5b1e1aa95f893cf604b93b7337cee7af24 (diff)
downloadsrc-0fd4e043f4dac8d72a9e5460ba8e852535ae7421.tar.gz
src-0fd4e043f4dac8d72a9e5460ba8e852535ae7421.zip
Add code to skip "userquota"/"groupquota" options needed for
quotaon/quotacheck
Notes
Notes: svn path=/head/; revision=3202
Diffstat (limited to 'sbin/mount_ifs/getmntopts.c')
-rw-r--r--sbin/mount_ifs/getmntopts.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/sbin/mount_ifs/getmntopts.c b/sbin/mount_ifs/getmntopts.c
index 2c84ae56e3d5..1af5e0f0d460 100644
--- a/sbin/mount_ifs/getmntopts.c
+++ b/sbin/mount_ifs/getmntopts.c
@@ -53,7 +53,7 @@ getmntopts(options, m0, flagp)
int *flagp;
{
const struct mntopt *m;
- int negative;
+ int negative, len;
char *opt, *optbuf;
/* Copy option string, since it is about to be torn asunder... */
@@ -69,9 +69,14 @@ getmntopts(options, m0, flagp)
negative = 0;
/* Scan option table. */
- for (m = m0; m->m_option != NULL; ++m)
- if (strcasecmp(opt, m->m_option) == 0)
+ for (m = m0; m->m_option != NULL; ++m) {
+ len = strlen(m->m_option);
+ if (strncasecmp(opt, m->m_option, len) == 0)
+ if ( m->m_option[len] == '\0'
+ || m->m_option[len] == '='
+ )
break;
+ }
/* Save flag, or fail if option is not recognised. */
if (m->m_option) {