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
047be3fa
Commit
047be3fa
authored
Aug 11, 2010
by
Ivan Krasin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use syscall.Msghdr. Test PASS
parent
61493549
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
16 deletions
+6
-16
fuse/fuse.go
fuse/fuse.go
+6
-16
No files found.
fuse/fuse.go
View file @
047be3fa
...
...
@@ -88,24 +88,14 @@ func (m *MountPoint) Unmount() (err os.Error) {
return
}
func
recvmsg
(
fd
int
,
msg
*
m
sghdr
,
flags
int
)
(
n
int
,
errno
int
)
{
func
recvmsg
(
fd
int
,
msg
*
syscall
.
M
sghdr
,
flags
int
)
(
n
int
,
errno
int
)
{
n1
,
_
,
e1
:=
syscall
.
Syscall
(
syscall
.
SYS_RECVMSG
,
uintptr
(
fd
),
uintptr
(
unsafe
.
Pointer
(
msg
)),
uintptr
(
flags
))
n
=
int
(
n1
)
errno
=
int
(
e1
)
return
}
type
msghdr
struct
{
Name
uintptr
Namelen
uintptr
Iov
uintptr
Iovlen
uintptr
Control
uintptr
Controllen
uintptr
Flags
uintptr
}
func
Recvmsg
(
fd
int
,
msg
*
msghdr
,
flags
int
)
(
n
int
,
err
os
.
Error
)
{
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
"
)
...
...
@@ -116,17 +106,17 @@ func Recvmsg(fd int, msg *msghdr, flags int) (n int, err os.Error) {
}
func
getFuseConn
(
local
net
.
Conn
)
(
f
*
os
.
File
,
err
os
.
Error
)
{
var
msg
m
sghdr
var
msg
syscall
.
M
sghdr
var
iov
syscall
.
Iovec
base
:=
make
([]
int32
,
256
)
control
:=
make
([]
int32
,
256
)
iov
.
Base
=
(
*
byte
)(
unsafe
.
Pointer
(
&
base
[
0
]))
iov
.
Len
=
uint64
(
len
(
base
)
*
4
)
msg
.
Iov
=
uintptr
(
unsafe
.
Pointer
(
&
iov
))
msg
.
Iov
=
(
*
syscall
.
Iovec
)
(
unsafe
.
Pointer
(
&
iov
))
msg
.
Iovlen
=
1
msg
.
Control
=
uintptr
(
unsafe
.
Pointer
(
&
control
[
0
]))
msg
.
Controllen
=
uint
ptr
(
len
(
control
)
*
4
)
msg
.
Control
=
(
*
byte
)
(
unsafe
.
Pointer
(
&
control
[
0
]))
msg
.
Controllen
=
uint
64
(
len
(
control
)
*
4
)
_
,
err
=
Recvmsg
(
local
.
File
()
.
Fd
(),
&
msg
,
0
)
fmt
.
Printf
(
"getFuseConn: 100
\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