Make slothfs-multifs show "slothfs" as filesystem type.
Change-Id: Ibfcc2de65ebcbacbf763a39c1876d8f196cf4843
diff --git a/cmd/slothfs-multifs/main.go b/cmd/slothfs-multifs/main.go
index 5c5c442..9865d78 100644
--- a/cmd/slothfs-multifs/main.go
+++ b/cmd/slothfs-multifs/main.go
@@ -25,6 +25,7 @@
"github.com/google/slothfs/cache"
"github.com/google/slothfs/fs"
"github.com/google/slothfs/gitiles"
+ "github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/fuse/nodefs"
)
@@ -74,15 +75,25 @@
}
root := fs.NewMultiFS(service, cache, opts)
- server, _, err := nodefs.MountRoot(mntDir, root, &nodefs.Options{
+ nodeFSOpts := &nodefs.Options{
EntryTimeout: time.Hour,
NegativeTimeout: time.Hour,
AttrTimeout: time.Hour,
Debug: *debug,
- })
- if err != nil {
- log.Fatalf("MountFileSystem: %v", err)
}
- log.Printf("Started Git MultiFS FUSE on %s", mntDir)
+ conn := nodefs.NewFileSystemConnector(root, nodeFSOpts)
+
+ mountOpts := fuse.MountOptions{
+ Name: "slothfs",
+ FsName: "slothfs",
+ Debug: *debug,
+ }
+
+ server, err := fuse.NewServer(conn.RawFS(), mntDir, &mountOpts)
+ if err != nil {
+ log.Fatalf("NewServer: %v", err)
+ }
+
+ log.Printf("Started SlothFS on %s", mntDir)
server.Serve()
}