svn commit: r222026 - stable/8/cddl/compat/opensolaris/misc
Jaakko Heinonen
jh at FreeBSD.org
Tue May 17 14:50:23 UTC 2011
Author: jh
Date: Tue May 17 14:50:23 2011
New Revision: 222026
URL: http://svn.freebsd.org/changeset/base/222026
Log:
MFC r221390: Don't pass empty mount options to nmount(2).
Modified:
stable/8/cddl/compat/opensolaris/misc/zmount.c
Directory Properties:
stable/8/cddl/compat/opensolaris/ (props changed)
Modified: stable/8/cddl/compat/opensolaris/misc/zmount.c
==============================================================================
--- stable/8/cddl/compat/opensolaris/misc/zmount.c Tue May 17 14:46:28 2011 (r222025)
+++ stable/8/cddl/compat/opensolaris/misc/zmount.c Tue May 17 14:50:23 2011 (r222026)
@@ -95,8 +95,10 @@ zmount(const char *spec, const char *dir
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);
More information about the svn-src-stable-8
mailing list