Commit cf2d1c3c authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

Add portable-inodes option to autounionfs.

parent 2eb340ae
...@@ -20,6 +20,9 @@ func main() { ...@@ -20,6 +20,9 @@ func main() {
hide_readonly_link := flag.Bool("hide_readonly_link", true, hide_readonly_link := flag.Bool("hide_readonly_link", true,
"Hides READONLY link from the top mountpoints. "+ "Hides READONLY link from the top mountpoints. "+
"Enabled by default.") "Enabled by default.")
portableInodes := flag.Bool("portable-inodes", false,
"Use sequential 32-bit inode numbers.")
flag.Parse() flag.Parse()
if *version { if *version {
...@@ -50,11 +53,13 @@ func main() { ...@@ -50,11 +53,13 @@ func main() {
}, },
HideReadonly: *hide_readonly_link, HideReadonly: *hide_readonly_link,
} }
fsOpts := fuse.FileSystemOptions{
PortableInodes: *portableInodes,
}
fmt.Printf("AutoUnionFs - Go-FUSE Version %v.\n", fuse.Version()) fmt.Printf("AutoUnionFs - Go-FUSE Version %v.\n", fuse.Version())
gofs := unionfs.NewAutoUnionFs(flag.Arg(1), options) gofs := unionfs.NewAutoUnionFs(flag.Arg(1), options)
pathfs := fuse.NewPathNodeFs(gofs, nil) pathfs := fuse.NewPathNodeFs(gofs, nil)
state, conn, err := fuse.MountNodeFileSystem(flag.Arg(0), pathfs, nil) state, conn, err := fuse.MountNodeFileSystem(flag.Arg(0), pathfs, &fsOpts)
if err != nil { if err != nil {
fmt.Printf("Mount fail: %v\n", err) fmt.Printf("Mount fail: %v\n", err)
os.Exit(1) os.Exit(1)
...@@ -66,7 +71,7 @@ func main() { ...@@ -66,7 +71,7 @@ func main() {
gofs.SetMountState(state) gofs.SetMountState(state)
gofs.SetFileSystemConnector(conn) gofs.SetFileSystemConnector(conn)
state.Loop() state.Loop()
time.Sleep(1 *time.Second) time.Sleep(1 *time.Second)
} }
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