]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - cmd_fusemount.c
fuse: Set fsname correctly
[bcachefs-tools-debian] / cmd_fusemount.c
index f07edb5abff877cc9f7d38ed2a5e63abb7d25f38..c5776dfef2abf7099a7a71dbd07770e46a81aeec 100644 (file)
@@ -1217,6 +1217,17 @@ int cmd_fusemount(int argc, char *argv[])
        }
        tokenize_devices(&ctx);
 
+       struct printbuf fsname = PRINTBUF;
+       prt_printf(&fsname, "fsname=");
+       for (i = 0; i < ctx.nr_devices; ++i) {
+               if (i)
+                       prt_str(&fsname, ":");
+               prt_str(&fsname, ctx.devices[i]);
+       }
+
+       fuse_opt_add_arg(&args, "-o");
+       fuse_opt_add_arg(&args, fsname.buf);
+
        /* Open bch */
        printf("Opening bcachefs filesystem on:\n");
        for (i = 0; i < ctx.nr_devices; ++i)