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

example: loopback: add -directmount, -directmountstrict flags

Allows to enable the DirectMount{,Strict} flag through the cli,
facilitating testing.

Change-Id: I46e273ea68e6a81b4e7873802bc3b1c7760f56f0
parent 56d54486
......@@ -48,6 +48,8 @@ func main() {
other := flag.Bool("allow-other", false, "mount with -o allowother.")
quiet := flag.Bool("q", false, "quiet")
ro := flag.Bool("ro", false, "mount read-only")
directmount := flag.Bool("directmount", false, "try to call the mount syscall instead of executing fusermount")
directmountstrict := flag.Bool("directmountstrict", false, "like directmount, but don't fall back to fusermount")
cpuprofile := flag.String("cpuprofile", "", "write cpu profile to this file")
memprofile := flag.String("memprofile", "", "write memory profile to this file")
flag.Parse()
......@@ -101,6 +103,8 @@ func main() {
MountOptions: fuse.MountOptions{
AllowOther: *other,
Debug: *debug,
DirectMount: *directmount,
DirectMountStrict: *directmountstrict,
FsName: orig, // First column in "df -T": original dir
Name: "loopback", // Second column in "df -T" will be shown as "fuse." + Name
},
......
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