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
82cd6e7b
Commit
82cd6e7b
authored
Feb 17, 2012
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update for weekly 2012-02.14
parent
1ea7b36d
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
16 additions
and
12 deletions
+16
-12
fuse/files.go
fuse/files.go
+3
-3
fuse/misc.go
fuse/misc.go
+1
-1
fuse/mount.go
fuse/mount.go
+4
-4
fuse/mountstate.go
fuse/mountstate.go
+1
-1
fuse/typeprint.go
fuse/typeprint.go
+3
-3
fuse/types.go
fuse/types.go
+4
-0
No files found.
fuse/files.go
View file @
82cd6e7b
...
...
@@ -113,11 +113,11 @@ func (me *LoopbackFile) Release() {
}
func
(
me
*
LoopbackFile
)
Fsync
(
*
FsyncIn
)
(
code
Status
)
{
return
ToStatus
(
syscall
.
Fsync
(
me
.
File
.
Fd
(
)))
return
ToStatus
(
syscall
.
Fsync
(
int
(
me
.
File
.
Fd
()
)))
}
func
(
me
*
LoopbackFile
)
Truncate
(
size
uint64
)
Status
{
return
ToStatus
(
syscall
.
Ftruncate
(
me
.
File
.
Fd
(
),
int64
(
size
)))
return
ToStatus
(
syscall
.
Ftruncate
(
int
(
me
.
File
.
Fd
()
),
int64
(
size
)))
}
// futimens missing from 6g runtime.
...
...
@@ -132,7 +132,7 @@ func (me *LoopbackFile) Chown(uid uint32, gid uint32) Status {
func
(
me
*
LoopbackFile
)
GetAttr
()
(
*
Attr
,
Status
)
{
st
:=
syscall
.
Stat_t
{}
err
:=
syscall
.
Fstat
(
me
.
File
.
Fd
(
),
&
st
)
err
:=
syscall
.
Fstat
(
int
(
me
.
File
.
Fd
()
),
&
st
)
if
err
!=
nil
{
return
nil
,
ToStatus
(
err
)
}
...
...
fuse/misc.go
View file @
82cd6e7b
...
...
@@ -39,7 +39,7 @@ func ToStatus(err error) Status {
case
syscall
.
Errno
:
return
Status
(
t
)
case
*
os
.
SyscallError
:
return
Status
(
t
.
Err
no
.
(
syscall
.
Errno
))
return
Status
(
t
.
Err
.
(
syscall
.
Errno
))
case
*
os
.
PathError
:
return
ToStatus
(
t
.
Err
)
case
*
os
.
LinkError
:
...
...
fuse/mount.go
View file @
82cd6e7b
...
...
@@ -19,8 +19,8 @@ func unixgramSocketpair() (l, r *os.File, err error) {
return
nil
,
nil
,
os
.
NewSyscallError
(
"socketpair"
,
err
.
(
syscall
.
Errno
))
}
l
=
os
.
NewFile
(
fd
[
0
]
,
"socketpair-half1"
)
r
=
os
.
NewFile
(
fd
[
1
]
,
"socketpair-half2"
)
l
=
os
.
NewFile
(
uintptr
(
fd
[
0
])
,
"socketpair-half1"
)
r
=
os
.
NewFile
(
uintptr
(
fd
[
1
])
,
"socketpair-half2"
)
return
}
...
...
@@ -118,7 +118,7 @@ func getConnection(local *os.File) (f *os.File, err error) {
// n, oobn, recvflags, from, errno - todo: error checking.
_
,
oobn
,
_
,
_
,
err
:=
syscall
.
Recvmsg
(
local
.
Fd
(
),
data
[
:
],
control
[
:
],
0
)
int
(
local
.
Fd
()
),
data
[
:
],
control
[
:
],
0
)
if
err
!=
nil
{
return
}
...
...
@@ -138,7 +138,7 @@ func getConnection(local *os.File) (f *os.File, err error) {
err
=
fmt
.
Errorf
(
"getConnection: fd < 0: %d"
,
fd
)
return
}
f
=
os
.
NewFile
(
int
(
fd
),
"<fuseConnection>"
)
f
=
os
.
NewFile
(
uintptr
(
fd
),
"<fuseConnection>"
)
return
}
...
...
fuse/mountstate.go
View file @
82cd6e7b
...
...
@@ -272,7 +272,7 @@ func (me *MountState) write(req *request) Status {
if
req
.
flatData
==
nil
{
_
,
err
=
me
.
mountFile
.
Write
(
req
.
outHeaderBytes
)
}
else
{
_
,
err
=
Writev
(
me
.
mountFile
.
Fd
(
),
_
,
err
=
Writev
(
int
(
me
.
mountFile
.
Fd
()
),
[][]
byte
{
req
.
outHeaderBytes
,
req
.
flatData
})
}
...
...
fuse/typeprint.go
View file @
82cd6e7b
...
...
@@ -24,11 +24,11 @@ func init() {
os
.
O_WRONLY
:
"WRONLY"
,
os
.
O_RDWR
:
"RDWR"
,
os
.
O_APPEND
:
"APPEND"
,
os
.
O_ASYNC
:
"ASYNC"
,
syscall
.
O_ASYNC
:
"ASYNC"
,
os
.
O_CREATE
:
"CREAT"
,
os
.
O_EXCL
:
"EXCL"
,
os
.
O_NOCTTY
:
"NOCTTY"
,
os
.
O_NONBLOCK
:
"NONBLOCK"
,
syscall
.
O_NOCTTY
:
"NOCTTY"
,
syscall
.
O_NONBLOCK
:
"NONBLOCK"
,
os
.
O_SYNC
:
"SYNC"
,
os
.
O_TRUNC
:
"TRUNC"
,
...
...
fuse/types.go
View file @
82cd6e7b
package
fuse
// #include <linux/fuse.h>
import
"C"
import
(
"os"
"syscall"
)
const
(
FUSE_ROOT_ID
=
1
...
...
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