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
923cd7b1
Commit
923cd7b1
authored
Dec 17, 2015
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Run gofmt.
parent
b1aee138
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
12 additions
and
13 deletions
+12
-13
fuse/misc.go
fuse/misc.go
+2
-2
fuse/mount_linux.go
fuse/mount_linux.go
+3
-3
fuse/nodefs/syscall.go
fuse/nodefs/syscall.go
+1
-1
fuse/opcode.go
fuse/opcode.go
+2
-2
fuse/pathfs/syscall_linux.go
fuse/pathfs/syscall_linux.go
+0
-1
fuse/pathfs/syscall_test.go
fuse/pathfs/syscall_test.go
+2
-2
fuse/splice_linux.go
fuse/splice_linux.go
+1
-1
fuse/test/fsetattr_test.go
fuse/test/fsetattr_test.go
+1
-1
No files found.
fuse/misc.go
View file @
923cd7b1
...
@@ -64,8 +64,8 @@ func toSlice(dest *[]byte, ptr unsafe.Pointer, byteCount uintptr) {
...
@@ -64,8 +64,8 @@ func toSlice(dest *[]byte, ptr unsafe.Pointer, byteCount uintptr) {
h
:=
(
*
reflect
.
SliceHeader
)(
unsafe
.
Pointer
(
dest
))
h
:=
(
*
reflect
.
SliceHeader
)(
unsafe
.
Pointer
(
dest
))
*
h
=
reflect
.
SliceHeader
{
*
h
=
reflect
.
SliceHeader
{
Data
:
uintptr
(
ptr
),
Data
:
uintptr
(
ptr
),
Len
:
int
(
byteCount
),
Len
:
int
(
byteCount
),
Cap
:
int
(
byteCount
),
Cap
:
int
(
byteCount
),
}
}
}
}
...
...
fuse/mount_linux.go
View file @
923cd7b1
package
fuse
package
fuse
import
(
import
(
"path"
"bytes"
"bytes"
"fmt"
"fmt"
"os"
"os"
"os/exec"
"os/exec"
"path"
"path/filepath"
"path/filepath"
"syscall"
"syscall"
"unsafe"
"unsafe"
...
@@ -37,7 +37,7 @@ func mount(mountPoint string, options string) (fd int, err error) {
...
@@ -37,7 +37,7 @@ func mount(mountPoint string, options string) (fd int, err error) {
if
err
!=
nil
{
if
err
!=
nil
{
return
0
,
err
return
0
,
err
}
}
cmd
:=
[]
string
{
bin
,
mountPoint
}
cmd
:=
[]
string
{
bin
,
mountPoint
}
if
options
!=
""
{
if
options
!=
""
{
cmd
=
append
(
cmd
,
"-o"
)
cmd
=
append
(
cmd
,
"-o"
)
...
@@ -71,7 +71,7 @@ func privilegedUnmount(mountPoint string) error {
...
@@ -71,7 +71,7 @@ func privilegedUnmount(mountPoint string) error {
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
}
}
proc
,
err
:=
os
.
StartProcess
(
bin
,
proc
,
err
:=
os
.
StartProcess
(
bin
,
[]
string
{
bin
,
mountPoint
},
[]
string
{
bin
,
mountPoint
},
&
os
.
ProcAttr
{
Dir
:
dir
,
Files
:
[]
*
os
.
File
{
nil
,
nil
,
os
.
Stderr
}})
&
os
.
ProcAttr
{
Dir
:
dir
,
Files
:
[]
*
os
.
File
{
nil
,
nil
,
os
.
Stderr
}})
...
...
fuse/nodefs/syscall.go
View file @
923cd7b1
package
nodefs
package
nodefs
import
(
import
(
"unsafe"
"syscall"
"syscall"
"unsafe"
)
)
// futimens - futimens(3) calls utimensat(2) with "pathname" set to null and
// futimens - futimens(3) calls utimensat(2) with "pathname" set to null and
...
...
fuse/opcode.go
View file @
923cd7b1
...
@@ -237,8 +237,8 @@ func doBatchForget(server *Server, req *request) {
...
@@ -237,8 +237,8 @@ func doBatchForget(server *Server, req *request) {
h
:=
&
reflect
.
SliceHeader
{
h
:=
&
reflect
.
SliceHeader
{
Data
:
uintptr
(
unsafe
.
Pointer
(
&
req
.
arg
[
0
])),
Data
:
uintptr
(
unsafe
.
Pointer
(
&
req
.
arg
[
0
])),
Len
:
int
(
in
.
Count
),
Len
:
int
(
in
.
Count
),
Cap
:
int
(
in
.
Count
),
Cap
:
int
(
in
.
Count
),
}
}
forgets
:=
*
(
*
[]
_ForgetOne
)(
unsafe
.
Pointer
(
h
))
forgets
:=
*
(
*
[]
_ForgetOne
)(
unsafe
.
Pointer
(
h
))
...
...
fuse/pathfs/syscall_linux.go
View file @
923cd7b1
...
@@ -117,7 +117,6 @@ func sysSetxattr(path string, attr string, val []byte, flag int) error {
...
@@ -117,7 +117,6 @@ func sysSetxattr(path string, attr string, val []byte, flag int) error {
return
syscall
.
Setxattr
(
path
,
attr
,
val
,
flag
)
return
syscall
.
Setxattr
(
path
,
attr
,
val
,
flag
)
}
}
const
_AT_SYMLINK_NOFOLLOW
=
0x100
const
_AT_SYMLINK_NOFOLLOW
=
0x100
// Linux kernel syscall utimensat(2)
// Linux kernel syscall utimensat(2)
...
...
fuse/pathfs/syscall_test.go
View file @
923cd7b1
package
pathfs
package
pathfs
import
(
import
(
"reflect"
"os"
"os"
"
testing
"
"
reflect
"
"syscall"
"syscall"
"testing"
)
)
func
TestSysUtimensat
(
t
*
testing
.
T
)
{
func
TestSysUtimensat
(
t
*
testing
.
T
)
{
...
...
fuse/splice_linux.go
View file @
923cd7b1
...
@@ -77,7 +77,7 @@ func (ms *Server) trySplice(header []byte, req *request, fdData *readResultFd) e
...
@@ -77,7 +77,7 @@ func (ms *Server) trySplice(header []byte, req *request, fdData *readResultFd) e
// Write data into pair2
// Write data into pair2
n
,
err
=
pair2
.
LoadFrom
(
pair1
.
ReadFd
(),
payloadLen
)
n
,
err
=
pair2
.
LoadFrom
(
pair1
.
ReadFd
(),
payloadLen
)
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
}
}
if
n
!=
payloadLen
{
if
n
!=
payloadLen
{
return
fmt
.
Errorf
(
"Short splice: wrote %d, want %d"
,
n
,
payloadLen
)
return
fmt
.
Errorf
(
"Short splice: wrote %d, want %d"
,
n
,
payloadLen
)
...
...
fuse/test/fsetattr_test.go
View file @
923cd7b1
...
@@ -18,7 +18,7 @@ type MutableDataFile struct {
...
@@ -18,7 +18,7 @@ type MutableDataFile struct {
data
[]
byte
data
[]
byte
fuse
.
Attr
fuse
.
Attr
GetAttrCalled
bool
GetAttrCalled
bool
FsyncCalled
bool
FsyncCalled
bool
}
}
func
(
f
*
MutableDataFile
)
String
()
string
{
func
(
f
*
MutableDataFile
)
String
()
string
{
...
...
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