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
34f664cc
Commit
34f664cc
authored
Apr 21, 2011
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename getFuseConn to getConnection.
parent
fbe06b9f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
fuse/mount.go
fuse/mount.go
+5
-5
No files found.
fuse/mount.go
View file @
34f664cc
...
...
@@ -68,7 +68,7 @@ func mount(mountPoint string) (f *os.File, finalMountPoint string, err os.Error)
return
}
f
,
err
=
get
FuseCon
n
(
local
)
f
,
err
=
get
Connectio
n
(
local
)
finalMountPoint
=
mountPoint
return
}
...
...
@@ -91,7 +91,7 @@ func unmount(mountPoint string) (err os.Error) {
return
}
func
get
FuseCon
n
(
local
*
os
.
File
)
(
f
*
os
.
File
,
err
os
.
Error
)
{
func
get
Connectio
n
(
local
*
os
.
File
)
(
f
*
os
.
File
,
err
os
.
Error
)
{
var
data
[
4
]
byte
control
:=
make
([]
byte
,
4
*
256
)
...
...
@@ -107,15 +107,15 @@ func getFuseConn(local *os.File) (f *os.File, err os.Error) {
fd
:=
*
(
*
int32
)(
unsafe
.
Pointer
(
uintptr
(
unsafe
.
Pointer
(
&
control
[
0
]))
+
syscall
.
SizeofCmsghdr
))
if
message
.
Type
!=
1
{
err
=
os
.
NewError
(
fmt
.
Sprintf
(
"get
FuseCon
n: recvmsg returned wrong control type: %d"
,
message
.
Type
))
err
=
os
.
NewError
(
fmt
.
Sprintf
(
"get
Connectio
n: recvmsg returned wrong control type: %d"
,
message
.
Type
))
return
}
if
oobn
<=
syscall
.
SizeofCmsghdr
{
err
=
os
.
NewError
(
fmt
.
Sprintf
(
"get
FuseCon
n: too short control message. Length: %d"
,
oobn
))
err
=
os
.
NewError
(
fmt
.
Sprintf
(
"get
Connectio
n: too short control message. Length: %d"
,
oobn
))
return
}
if
fd
<
0
{
err
=
os
.
NewError
(
fmt
.
Sprintf
(
"get
FuseCon
n: fd < 0: %d"
,
fd
))
err
=
os
.
NewError
(
fmt
.
Sprintf
(
"get
Connectio
n: fd < 0: %d"
,
fd
))
return
}
f
=
os
.
NewFile
(
int
(
fd
),
"<fuseConnection>"
)
...
...
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