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);
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to