Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Aug 2012 22:05:51 +0000 (UTC)
From:      Attilio Rao <attilio@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r239924 - projects/fuse/sys/fs/fuse
Message-ID:  <201208302205.q7UM5prj021509@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201208302205.q7UM5prj021509>