From: Nicholas Clark Date: Tue, 16 Oct 2018 19:34:20 +0000 (-0400) Subject: fuse2fs: fix fsname option in some cases X-Git-Tag: v1.44.5~17 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=4dda2315104c4f6abc0cd6e3284fef32b7b59d2c;p=tools%2Fe2fsprogs.git fuse2fs: fix fsname option in some cases 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 Signed-off-by: Theodore Ts'o --- diff --git a/misc/fuse2fs.c b/misc/fuse2fs.c index 5c73895..3214be4 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);