diff options
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/mount/mount.c | 4 | ||||
-rw-r--r-- | sbin/mount_ifs/mount.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/sbin/mount/mount.c b/sbin/mount/mount.c index f0ff782..d16b3d6 100644 --- a/sbin/mount/mount.c +++ b/sbin/mount/mount.c @@ -261,11 +261,13 @@ mountfs(vfstype, spec, name, flags, options, mntopts) warn("%s", mntpath); return (1); } + if (mntopts == NULL) + mntopts = ""; name = mntpath; if (options == NULL) { - if (mntopts == NULL || *mntopts == '\0') + if (*mntopts == '\0') options = "rw"; else options = mntopts; diff --git a/sbin/mount_ifs/mount.c b/sbin/mount_ifs/mount.c index f0ff782..d16b3d6 100644 --- a/sbin/mount_ifs/mount.c +++ b/sbin/mount_ifs/mount.c @@ -261,11 +261,13 @@ mountfs(vfstype, spec, name, flags, options, mntopts) warn("%s", mntpath); return (1); } + if (mntopts == NULL) + mntopts = ""; name = mntpath; if (options == NULL) { - if (mntopts == NULL || *mntopts == '\0') + if (*mntopts == '\0') options = "rw"; else options = mntopts; |