summaryrefslogtreecommitdiff
path: root/cmd_fusemount.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-08-11 18:16:14 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-08-11 18:32:23 -0400
commitae23e4541f020f3096ede3ac62ba6ab9cd37af3b (patch)
tree5543354772b13083b26529bf11bc3c0ba38968e5 /cmd_fusemount.c
parent0de1fb41b7bc97fabda78e5416a600a723a51c3d (diff)
fuse: Set fsname correctly
Also, add helpers for the fuse.bcachefs filesystem type; this means we can now test the fuse version with fstests. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'cmd_fusemount.c')
-rw-r--r--cmd_fusemount.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/cmd_fusemount.c b/cmd_fusemount.c
index f07edb5..c5776df 100644
--- a/cmd_fusemount.c
+++ b/cmd_fusemount.c
@@ -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)