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
61493549
Commit
61493549
authored
Aug 11, 2010
by
Ivan Krasin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use syscall.Iovec. Test PASS
parent
aab0374f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
8 deletions
+4
-8
fuse/fuse.go
fuse/fuse.go
+4
-8
No files found.
fuse/fuse.go
View file @
61493549
...
@@ -105,11 +105,6 @@ type msghdr struct {
...
@@ -105,11 +105,6 @@ type msghdr struct {
Flags
uintptr
Flags
uintptr
}
}
type
iovec
struct
{
Base
uintptr
Len
uintptr
}
func
Recvmsg
(
fd
int
,
msg
*
msghdr
,
flags
int
)
(
n
int
,
err
os
.
Error
)
{
func
Recvmsg
(
fd
int
,
msg
*
msghdr
,
flags
int
)
(
n
int
,
err
os
.
Error
)
{
fmt
.
Printf
(
"Recvmsg, 0
\n
"
)
fmt
.
Printf
(
"Recvmsg, 0
\n
"
)
n
,
errno
:=
recvmsg
(
fd
,
msg
,
flags
)
n
,
errno
:=
recvmsg
(
fd
,
msg
,
flags
)
...
@@ -122,12 +117,12 @@ func Recvmsg(fd int, msg *msghdr, flags int) (n int, err os.Error) {
...
@@ -122,12 +117,12 @@ func Recvmsg(fd int, msg *msghdr, flags int) (n int, err os.Error) {
func
getFuseConn
(
local
net
.
Conn
)
(
f
*
os
.
File
,
err
os
.
Error
)
{
func
getFuseConn
(
local
net
.
Conn
)
(
f
*
os
.
File
,
err
os
.
Error
)
{
var
msg
msghdr
var
msg
msghdr
var
iov
i
ovec
var
iov
syscall
.
I
ovec
base
:=
make
([]
int32
,
256
)
base
:=
make
([]
int32
,
256
)
control
:=
make
([]
int32
,
256
)
control
:=
make
([]
int32
,
256
)
iov
.
Base
=
uintptr
(
unsafe
.
Pointer
(
&
base
[
0
]))
iov
.
Base
=
(
*
byte
)
(
unsafe
.
Pointer
(
&
base
[
0
]))
iov
.
Len
=
uint
ptr
(
len
(
base
)
*
4
)
iov
.
Len
=
uint
64
(
len
(
base
)
*
4
)
msg
.
Iov
=
uintptr
(
unsafe
.
Pointer
(
&
iov
))
msg
.
Iov
=
uintptr
(
unsafe
.
Pointer
(
&
iov
))
msg
.
Iovlen
=
1
msg
.
Iovlen
=
1
msg
.
Control
=
uintptr
(
unsafe
.
Pointer
(
&
control
[
0
]))
msg
.
Control
=
uintptr
(
unsafe
.
Pointer
(
&
control
[
0
]))
...
@@ -158,6 +153,7 @@ func getFuseConn(local net.Conn) (f * os.File, err os.Error) {
...
@@ -158,6 +153,7 @@ func getFuseConn(local net.Conn) (f * os.File, err os.Error) {
err
=
os
.
NewError
(
fmt
.
Sprintf
(
"getFuseConn: fd < 0: %d"
,
fd
))
err
=
os
.
NewError
(
fmt
.
Sprintf
(
"getFuseConn: fd < 0: %d"
,
fd
))
return
return
}
}
fmt
.
Printf
(
"fd: %d
\n
"
,
fd
)
fmt
.
Printf
(
"getFuseConn: 180
\n
"
)
fmt
.
Printf
(
"getFuseConn: 180
\n
"
)
f
=
os
.
NewFile
(
int
(
fd
),
"fuse-conn"
)
f
=
os
.
NewFile
(
int
(
fd
),
"fuse-conn"
)
...
...
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