From owner-svn-src-head@FreeBSD.ORG Tue May 3 16:00:27 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 18A01106566B; Tue, 3 May 2011 16:00:27 +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 063C18FC12; Tue, 3 May 2011 16:00:27 +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 p43G0QJw001109; Tue, 3 May 2011 16:00:26 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p43G0QiD001107; Tue, 3 May 2011 16:00:26 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201105031600.p43G0QiD001107@svn.freebsd.org> From: Jaakko Heinonen Date: Tue, 3 May 2011 16:00:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221390 - head/cddl/compat/opensolaris/misc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 16:00:27 -0000 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);