Date: Tue, 17 May 2011 14:50:23 +0000 (UTC) From: Jaakko Heinonen <jh@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r222026 - stable/8/cddl/compat/opensolaris/misc Message-ID: <201105171450.p4HEoNkm035405@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201105171450.p4HEoNkm035405>