svn commit: r221390 - head/cddl/compat/opensolaris/misc
Jaakko Heinonen
jh at FreeBSD.org
Tue May 3 16:00:27 UTC 2011
Author: jh
Date: Tue May 3 16:00:26 2011
New Revision: 221390
URL: http://svn.freebsd.org/changeset/base/221390
Log:
Don't pass empty mount options to nmount(2).
Reviewed by: pjd
MFC after: 2 weeks
Modified:
head/cddl/compat/opensolaris/misc/zmount.c
Modified: head/cddl/compat/opensolaris/misc/zmount.c
==============================================================================
--- head/cddl/compat/opensolaris/misc/zmount.c Tue May 3 15:58:24 2011 (r221389)
+++ head/cddl/compat/opensolaris/misc/zmount.c Tue May 3 16:00:26 2011 (r221390)
@@ -98,8 +98,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-head
mailing list