Commit 62cc4b45 authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

Print path names in FileSystemConnector if Debug is set.

parent 22e2fb1a
...@@ -39,6 +39,7 @@ func main() { ...@@ -39,6 +39,7 @@ func main() {
gofs := unionfs.NewAutoUnionFs(flag.Arg(1), options) gofs := unionfs.NewAutoUnionFs(flag.Arg(1), options)
conn := fuse.NewFileSystemConnector(gofs, nil) conn := fuse.NewFileSystemConnector(gofs, nil)
conn.Debug = *debug
mountState := fuse.NewMountState(conn) mountState := fuse.NewMountState(conn)
mountState.Debug = *debug mountState.Debug = *debug
fmt.Printf("Mounting...\n") fmt.Printf("Mounting...\n")
......
...@@ -410,9 +410,7 @@ func (me *FileSystemConnector) Mount(mountPoint string, fs FileSystem, opts *Mou ...@@ -410,9 +410,7 @@ func (me *FileSystemConnector) Mount(mountPoint string, fs FileSystem, opts *Mou
code := fs.Mount(me) code := fs.Mount(me)
if code != OK { if code != OK {
if me.Debug { log.Println("Mount error: ", mountPoint, code)
log.Println("Mount error: ", mountPoint, code)
}
return code return code
} }
...@@ -476,5 +474,9 @@ func (me *FileSystemConnector) GetPath(nodeid uint64) (path string, mount *mount ...@@ -476,5 +474,9 @@ func (me *FileSystemConnector) GetPath(nodeid uint64) (path string, mount *mount
defer me.treeLock.RUnlock() defer me.treeLock.RUnlock()
p, m := n.GetPath() p, m := n.GetPath()
if me.Debug {
log.Printf("Node %v = '%s'", nodeid, p)
}
return p, m, n return p, m, n
} }
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