Commit 56d54486 authored by Jakob Unterwurzacher's avatar Jakob Unterwurzacher Committed by Han-Wen Nienhuys

example: loopback: use FsName field

Commit

	17c7e2cd loopback: show original directory in "df"

added the FsName field to MountOptions, but looks like

	d31db957 fuse: allow setting the fsname (first column in df -T)

forgot that it exists. Use it now.

This will be important for DirectMount, as passing "fsname=xxx" to
the mount syscall causes the kernel to reject with EINVAL and this
message in dmesg:

	[132274.900267] fuse: Unknown parameter 'fsname'

Change-Id: Ic1233fe9306e2ce05f85189eecceecec2baa44b7
parent 59d90a47
......@@ -101,6 +101,7 @@ func main() {
MountOptions: fuse.MountOptions{
AllowOther: *other,
Debug: *debug,
FsName: orig, // First column in "df -T": original dir
Name: "loopback", // Second column in "df -T" will be shown as "fuse." + Name
},
}
......@@ -111,8 +112,6 @@ func main() {
if *ro {
opts.MountOptions.Options = append(opts.MountOptions.Options, "ro")
}
// First column in "df -T": original dir
opts.MountOptions.Options = append(opts.MountOptions.Options, "fsname="+orig)
// Enable diagnostics logging
if !*quiet {
opts.Logger = log.New(os.Stderr, "", 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment