summaryrefslogtreecommitdiffstats
path: root/cddl
diff options
context:
space:
mode:
authorjh <jh@FreeBSD.org>2011-05-03 16:00:26 +0000
committerjh <jh@FreeBSD.org>2011-05-03 16:00:26 +0000
commite43878f43c377ac289869d75122d0fb5cdf27114 (patch)
tree7225007572f854688f41bdc9e01eed98d1983b8a /cddl
parent2f3429a5d8c5c865da9d6a9c98b99d6c894e9a08 (diff)
downloadFreeBSD-src-e43878f43c377ac289869d75122d0fb5cdf27114.zip
FreeBSD-src-e43878f43c377ac289869d75122d0fb5cdf27114.tar.gz
Don't pass empty mount options to nmount(2).
Reviewed by: pjd MFC after: 2 weeks
Diffstat (limited to 'cddl')
-rw-r--r--cddl/compat/opensolaris/misc/zmount.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/cddl/compat/opensolaris/misc/zmount.c b/cddl/compat/opensolaris/misc/zmount.c
index b4f99e3..d46b378 100644
--- a/cddl/compat/opensolaris/misc/zmount.c
+++ b/cddl/compat/opensolaris/misc/zmount.c
@@ -98,8 +98,10 @@ zmount(const char *spec, const char *dir, int mflag, char *fstype,
build_iovec(&iov, &iovlen, "fspath", __DECONST(char *, dir),
(size_t)-1);
build_iovec(&iov, &iovlen, "from", __DECONST(char *, spec), (size_t)-1);
- for (p = optstr; p != NULL; strsep(&p, ",/ "))
- build_iovec(&iov, &iovlen, p, NULL, (size_t)-1);
+ for (p = optstr; p != NULL; strsep(&p, ",/ ")) {
+ if (*p != '\0')
+ build_iovec(&iov, &iovlen, p, NULL, (size_t)-1);
+ }
rv = nmount(iov, iovlen, 0);
free(optstr);
return (rv);
OpenPOWER on IntegriCloud