diff mbox series

[RESEND,1/2] Fuse2fs: fix 'mount' entry in some cases.

Message ID 20181014145837.6344-2-nicholas.clark@gmail.com
State Superseded
Headers show
Series e2fsprogs: fuse2fs bugfix and new 'fakeroot' feature | expand

Commit Message

nicholas.clark@gmail.com Oct. 14, 2018, 2:58 p.m. UTC
From: Nicholas Clark <nicholas.clark@gmail.com>

FUSE's parser allows command-line options to be specified before
or after the device/image and mount-path. This commit changes the
value of the fsname mount option to be correct even if options are
specified before the target device/image.

Signed-off-by: Nicholas Clark <nicholas.clark@gmail.com>
---
 misc/fuse2fs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/misc/fuse2fs.c b/misc/fuse2fs.c
index 5c73895e..3214be4a 100644
--- a/misc/fuse2fs.c
+++ b/misc/fuse2fs.c
@@ -3845,7 +3845,7 @@  int main(int argc, char *argv[])
 	/* Set up default fuse parameters */
 	snprintf(extra_args, BUFSIZ, "-okernel_cache,subtype=ext4,use_ino,"
 		 "fsname=%s,attr_timeout=0" FUSE_PLATFORM_OPTS,
-		 argv[1]);
+		 fctx.device);
 	if (fctx.no_default_opts == 0)
 		fuse_opt_add_arg(&args, extra_args);