Commit 923cd7b1 authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

Run gofmt.

parent b1aee138
......@@ -64,8 +64,8 @@ func toSlice(dest *[]byte, ptr unsafe.Pointer, byteCount uintptr) {
h := (*reflect.SliceHeader)(unsafe.Pointer(dest))
*h = reflect.SliceHeader{
Data: uintptr(ptr),
Len: int(byteCount),
Cap: int(byteCount),
Len: int(byteCount),
Cap: int(byteCount),
}
}
......
package fuse
import (
"path"
"bytes"
"fmt"
"os"
"os/exec"
"path"
"path/filepath"
"syscall"
"unsafe"
......@@ -37,7 +37,7 @@ func mount(mountPoint string, options string) (fd int, err error) {
if err != nil {
return 0, err
}
cmd := []string{bin, mountPoint}
if options != "" {
cmd = append(cmd, "-o")
......@@ -71,7 +71,7 @@ func privilegedUnmount(mountPoint string) error {
if err != nil {
return err
}
proc, err := os.StartProcess(bin,
[]string{bin, mountPoint},
&os.ProcAttr{Dir: dir, Files: []*os.File{nil, nil, os.Stderr}})
......
package nodefs
import (
"unsafe"
"syscall"
"unsafe"
)
// futimens - futimens(3) calls utimensat(2) with "pathname" set to null and
......
......@@ -237,8 +237,8 @@ func doBatchForget(server *Server, req *request) {
h := &reflect.SliceHeader{
Data: uintptr(unsafe.Pointer(&req.arg[0])),
Len: int(in.Count),
Cap: int(in.Count),
Len: int(in.Count),
Cap: int(in.Count),
}
forgets := *(*[]_ForgetOne)(unsafe.Pointer(h))
......
......@@ -117,7 +117,6 @@ func sysSetxattr(path string, attr string, val []byte, flag int) error {
return syscall.Setxattr(path, attr, val, flag)
}
const _AT_SYMLINK_NOFOLLOW = 0x100
// Linux kernel syscall utimensat(2)
......
package pathfs
import (
"reflect"
"os"
"testing"
"reflect"
"syscall"
"testing"
)
func TestSysUtimensat(t *testing.T) {
......
......@@ -77,7 +77,7 @@ func (ms *Server) trySplice(header []byte, req *request, fdData *readResultFd) e
// Write data into pair2
n, err = pair2.LoadFrom(pair1.ReadFd(), payloadLen)
if err != nil {
return err
return err
}
if n != payloadLen {
return fmt.Errorf("Short splice: wrote %d, want %d", n, payloadLen)
......
......@@ -18,7 +18,7 @@ type MutableDataFile struct {
data []byte
fuse.Attr
GetAttrCalled bool
FsyncCalled bool
FsyncCalled bool
}
func (f *MutableDataFile) String() string {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment