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
Levin Zimmermann
go-fuse
Commits
e2ee3e08
Commit
e2ee3e08
authored
Aug 11, 2010
by
Ivan Krasin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed unused logging
parent
047be3fa
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
15 deletions
+2
-15
fuse/fuse.go
fuse/fuse.go
+2
-15
No files found.
fuse/fuse.go
View file @
e2ee3e08
...
...
@@ -29,7 +29,6 @@ func Mount(mountPoint string, fs FileSystem) (m *MountPoint, err os.Error) {
defer
local
.
Close
()
defer
remote
.
Close
()
fmt
.
Printf
(
"Mount: 20
\n
"
)
mountPoint
=
path
.
Clean
(
mountPoint
)
if
!
path
.
Rooted
(
mountPoint
)
{
cwd
,
err
:=
os
.
Getwd
()
...
...
@@ -38,12 +37,11 @@ func Mount(mountPoint string, fs FileSystem) (m *MountPoint, err os.Error) {
}
mountPoint
=
path
.
Clean
(
path
.
Join
(
cwd
,
mountPoint
))
}
fmt
.
Printf
(
"Mount: 40
\n
"
)
pid
,
err
:=
os
.
ForkExec
(
"/bin/fusermount"
,
[]
string
{
"/bin/fusermount"
,
mountPoint
},
[]
string
{
"_FUSE_COMMFD=3"
},
""
,
[]
*
os
.
File
{
nil
,
nil
,
os
.
Stderr
,
remote
.
File
()
})
[]
*
os
.
File
{
nil
,
nil
,
nil
,
remote
.
File
()
})
if
err
!=
nil
{
return
}
...
...
@@ -54,14 +52,12 @@ func Mount(mountPoint string, fs FileSystem) (m *MountPoint, err os.Error) {
if
w
.
ExitStatus
()
!=
0
{
return
nil
,
os
.
NewError
(
fmt
.
Sprintf
(
"fusermount exited with code %d
\n
"
,
w
.
ExitStatus
()))
}
fmt
.
Printf
(
"Mount: 100
\n
"
)
f
,
err
:=
getFuseConn
(
local
)
fmt
.
Printf
(
"Mount: 110
\n
"
)
if
err
!=
nil
{
return
}
m
=
&
MountPoint
{
mountPoint
,
f
}
fmt
.
Printf
(
"I'm here!!
\n
"
)
return
}
...
...
@@ -96,9 +92,7 @@ func recvmsg(fd int, msg *syscall.Msghdr, flags int) (n int, errno int) {
}
func
Recvmsg
(
fd
int
,
msg
*
syscall
.
Msghdr
,
flags
int
)
(
n
int
,
err
os
.
Error
)
{
fmt
.
Printf
(
"Recvmsg, 0
\n
"
)
n
,
errno
:=
recvmsg
(
fd
,
msg
,
flags
)
fmt
.
Printf
(
"Recvmsg, 10
\n
"
)
if
errno
!=
0
{
err
=
os
.
NewSyscallError
(
"recvmsg"
,
errno
)
}
...
...
@@ -119,17 +113,13 @@ func getFuseConn(local net.Conn) (f * os.File, err os.Error) {
msg
.
Controllen
=
uint64
(
len
(
control
)
*
4
)
_
,
err
=
Recvmsg
(
local
.
File
()
.
Fd
(),
&
msg
,
0
)
fmt
.
Printf
(
"getFuseConn: 100
\n
"
)
if
err
!=
nil
{
return
}
fmt
.
Printf
(
"getFuseConn: 110
\n
"
)
length
:=
control
[
0
]
fmt
.
Printf
(
"getFuseConn: 120
\n
"
)
typ
:=
control
[
2
]
// syscall.Cmsghdr.Type
fd
:=
control
[
4
]
fmt
.
Printf
(
"getFuseConn: 130
\n
"
)
if
typ
!=
1
{
err
=
os
.
NewError
(
fmt
.
Sprintf
(
"getFuseConn: recvmsg returned wrong control type: %d"
,
typ
))
return
...
...
@@ -143,9 +133,6 @@ func getFuseConn(local net.Conn) (f * os.File, err os.Error) {
err
=
os
.
NewError
(
fmt
.
Sprintf
(
"getFuseConn: fd < 0: %d"
,
fd
))
return
}
fmt
.
Printf
(
"fd: %d
\n
"
,
fd
)
fmt
.
Printf
(
"getFuseConn: 180
\n
"
)
f
=
os
.
NewFile
(
int
(
fd
),
"fuse-conn"
)
return
}
...
...
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