From owner-svn-src-stable-8@FreeBSD.ORG Tue May 17 14:50:23 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8374B10656F0; Tue, 17 May 2011 14:50:23 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 735CD8FC1B; Tue, 17 May 2011 14:50:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4HEoNVj035407; Tue, 17 May 2011 14:50:23 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4HEoNkm035405; Tue, 17 May 2011 14:50:23 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201105171450.p4HEoNkm035405@svn.freebsd.org> From: Jaakko Heinonen Date: Tue, 17 May 2011 14:50:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222026 - stable/8/cddl/compat/opensolaris/misc X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 May 2011 14:50:23 -0000 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);