svn commit: r239924 - projects/fuse/sys/fs/fuse

Attilio Rao attilio at FreeBSD.org
Thu Aug 30 22:05:51 UTC 2012


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)


More information about the svn-src-projects mailing list