mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-01-22 00:04:31 +03:00
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>
This commit is contained in:
parent
0de1fb41b7
commit
ae23e4541f
3
Makefile
3
Makefile
@ -155,6 +155,9 @@ install: bcachefs
|
||||
$(INSTALL) -m0755 fsck.bcachefs $(DESTDIR)$(ROOT_SBINDIR)
|
||||
$(INSTALL) -m0755 mkfs.bcachefs $(DESTDIR)$(ROOT_SBINDIR)
|
||||
$(INSTALL) -m0755 mount.bcachefs $(DESTDIR)$(ROOT_SBINDIR)
|
||||
$(INSTALL) -m0755 fsck.bcachefs $(DESTDIR)$(ROOT_SBINDIR)/fsck.fuse.bcachefs
|
||||
$(INSTALL) -m0755 mkfs.bcachefs $(DESTDIR)$(ROOT_SBINDIR)/mkfs.fuse.bcachefs
|
||||
$(INSTALL) -m0755 mount.fuse.bcachefs $(DESTDIR)$(ROOT_SBINDIR)
|
||||
$(INSTALL) -m0644 -D bcachefs.8 -t $(DESTDIR)$(PREFIX)/share/man/man8/
|
||||
$(INSTALL) -m0755 -D initramfs/script $(DESTDIR)$(INITRAMFS_SCRIPT)
|
||||
$(INSTALL) -m0755 -D initramfs/hook $(DESTDIR)$(INITRAMFS_HOOK)
|
||||
|
@ -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)
|
||||
|
3
mount.fuse.bcachefs
Executable file
3
mount.fuse.bcachefs
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
exec bcachefs fusemount "$@"
|
@ -45,10 +45,13 @@ rm -f %{buildroot}/%{_datadir}/initramfs-tools/scripts/local-premount/bcachefs
|
||||
rm -f %{buildroot}/usr/lib/libbcachefs.so
|
||||
|
||||
%files
|
||||
%{_sbindir}/mount.bcachefs
|
||||
%{_sbindir}/bcachefs
|
||||
%{_sbindir}/mount.bcachefs
|
||||
%{_sbindir}/fsck.bcachefs
|
||||
%{_sbindir}/mkfs.bcachefs
|
||||
%{_sbindir}/mount.fuse.bcachefs
|
||||
%{_sbindir}/fsck.fuse.bcachefs
|
||||
%{_sbindir}/mkfs.fuse.bcachefs
|
||||
%{_mandir}/man8/bcachefs.8.gz
|
||||
|
||||
%changelog
|
||||
|
Loading…
Reference in New Issue
Block a user