svn commit: r223051 - stable/7/cddl/compat/opensolaris/misc

Jaakko Heinonen jh at FreeBSD.org
Mon Jun 13 15:59:21 UTC 2011


Author: jh
Date: Mon Jun 13 15:59:21 2011
New Revision: 223051
URL: http://svn.freebsd.org/changeset/base/223051

Log:
  MFC r221390: Don't pass empty mount options to nmount(2).

Modified:
  stable/7/cddl/compat/opensolaris/misc/zmount.c
Directory Properties:
  stable/7/cddl/compat/opensolaris/   (props changed)

Modified: stable/7/cddl/compat/opensolaris/misc/zmount.c
==============================================================================
--- stable/7/cddl/compat/opensolaris/misc/zmount.c	Mon Jun 13 15:53:56 2011	(r223050)
+++ stable/7/cddl/compat/opensolaris/misc/zmount.c	Mon Jun 13 15:59:21 2011	(r223051)
@@ -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-7 mailing list