Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go-fuse
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go-fuse
Commits
62cc4b45
Commit
62cc4b45
authored
Apr 29, 2011
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Print path names in FileSystemConnector if Debug is set.
parent
22e2fb1a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
example/autounionfs/main.go
example/autounionfs/main.go
+1
-0
fuse/pathfilesystem.go
fuse/pathfilesystem.go
+5
-3
No files found.
example/autounionfs/main.go
View file @
62cc4b45
...
@@ -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
"
)
...
...
fuse/pathfilesystem.go
View file @
62cc4b45
...
@@ -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
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment