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) { ...@@ -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),
} }
} }
......
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}})
......
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
......
...@@ -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))
......
...@@ -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)
......
package pathfs package pathfs
import ( import (
"reflect"
"os" "os"
"testing" "reflect"
"syscall" "syscall"
"testing"
) )
func TestSysUtimensat(t *testing.T) { func TestSysUtimensat(t *testing.T) {
......
...@@ -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)
......
...@@ -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 {
......
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