From owner-svn-src-projects@FreeBSD.ORG Thu Aug 30 22:05:51 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD2C2106564A; Thu, 30 Aug 2012 22:05:51 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A77EA8FC14; Thu, 30 Aug 2012 22:05:51 +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 q7UM5piH021511; Thu, 30 Aug 2012 22:05:51 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7UM5prj021509; Thu, 30 Aug 2012 22:05:51 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201208302205.q7UM5prj021509@svn.freebsd.org> From: Attilio Rao Date: Thu, 30 Aug 2012 22:05:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239924 - projects/fuse/sys/fs/fuse X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2012 22:05:51 -0000 Author: attilio Date: Thu Aug 30 22:05:51 2012 New Revision: 239924 URL: http://svn.freebsd.org/changeset/base/239924 Log: Fixup to r238693: even if vfs_setscanopt() will fail, we will always return 0 forcing a wrong recognition of the success of the operation. Also, we expect exactly 1 object to be scanned, so if it is more than one also fail the operation. Reported by: Gustau Perez i Querol Modified: projects/fuse/sys/fs/fuse/fuse_vfsops.c Modified: projects/fuse/sys/fs/fuse/fuse_vfsops.c ============================================================================== --- projects/fuse/sys/fs/fuse/fuse_vfsops.c Thu Aug 30 21:22:47 2012 (r239923) +++ projects/fuse/sys/fs/fuse/fuse_vfsops.c Thu Aug 30 22:05:51 2012 (r239924) @@ -252,8 +252,8 @@ fuse_vfsop_mount(struct mount *mp) return err; /* `fd' contains the filedescriptor for this session; REQUIRED */ - if (!vfs_scanopt(opts, "fd", "%d", &fd)) - return err; + if (vfs_scanopt(opts, "fd", "%d", &fd) != 1) + return EINVAL; err = fuse_getdevice(fspec, td, &fdev); if (err != 0)