Commit cb10e93d authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

Run gofmt.

parent 8bfc931c
...@@ -18,7 +18,7 @@ func main() { ...@@ -18,7 +18,7 @@ func main() {
deldirname := flag.String( deldirname := flag.String(
"deletion_dirname", "GOUNIONFS_DELETIONS", "Directory name to use for deletions.") "deletion_dirname", "GOUNIONFS_DELETIONS", "Directory name to use for deletions.")
hide_readonly_link := flag.Bool("hide_readonly_link", true, hide_readonly_link := flag.Bool("hide_readonly_link", true,
"Hides READONLY link from the top mountpoints. " + "Hides READONLY link from the top mountpoints. "+
"Enabled by default.") "Enabled by default.")
flag.Parse() flag.Parse()
......
...@@ -17,7 +17,6 @@ type BufferPool interface { ...@@ -17,7 +17,6 @@ type BufferPool interface {
} }
type GcBufferPool struct { type GcBufferPool struct {
} }
// NewGcBufferPool is just a fallback to the standard allocation routines. // NewGcBufferPool is just a fallback to the standard allocation routines.
......
...@@ -33,6 +33,7 @@ type Handled struct { ...@@ -33,6 +33,7 @@ type Handled struct {
} }
const _ALREADY_MSG = "Object already has a handle" const _ALREADY_MSG = "Object already has a handle"
//////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////
// portable version using 32 bit integers. // portable version using 32 bit integers.
......
...@@ -283,9 +283,9 @@ func TestLinkExisting(t *testing.T) { ...@@ -283,9 +283,9 @@ func TestLinkExisting(t *testing.T) {
CheckSuccess(err) CheckSuccess(err)
var s1, s2 syscall.Stat_t var s1, s2 syscall.Stat_t
err = syscall.Lstat(me.mnt + "/file1", &s1) err = syscall.Lstat(me.mnt+"/file1", &s1)
CheckSuccess(err) CheckSuccess(err)
err = syscall.Lstat(me.mnt + "/file2", &s2) err = syscall.Lstat(me.mnt+"/file2", &s2)
CheckSuccess(err) CheckSuccess(err)
if s1.Ino != s2.Ino { if s1.Ino != s2.Ino {
...@@ -313,12 +313,12 @@ func TestLinkForget(t *testing.T) { ...@@ -313,12 +313,12 @@ func TestLinkForget(t *testing.T) {
CheckSuccess(err) CheckSuccess(err)
var s1, s2 syscall.Stat_t var s1, s2 syscall.Stat_t
err = syscall.Lstat(me.mnt + "/file1", &s1) err = syscall.Lstat(me.mnt+"/file1", &s1)
CheckSuccess(err) CheckSuccess(err)
me.pathFs.ForgetClientInodes() me.pathFs.ForgetClientInodes()
err = syscall.Lstat(me.mnt + "/file2", &s2) err = syscall.Lstat(me.mnt+"/file2", &s2)
CheckSuccess(err) CheckSuccess(err)
if s1.Ino == s2.Ino { if s1.Ino == s2.Ino {
t.Error("After forget, we should not export links") t.Error("After forget, we should not export links")
......
...@@ -36,11 +36,11 @@ func TestLinkAt(t *testing.T) { ...@@ -36,11 +36,11 @@ func TestLinkAt(t *testing.T) {
} }
var s1, s2 syscall.Stat_t var s1, s2 syscall.Stat_t
err := syscall.Lstat(dir + "/a", &s1) err := syscall.Lstat(dir+"/a", &s1)
if err != nil { if err != nil {
t.Fatalf("Lstat a: %v", err) t.Fatalf("Lstat a: %v", err)
} }
err = syscall.Lstat(dir + "/b", &s2) err = syscall.Lstat(dir+"/b", &s2)
if err != nil { if err != nil {
t.Fatalf("Lstat b: %v", err) t.Fatalf("Lstat b: %v", err)
} }
......
...@@ -46,7 +46,7 @@ func TestOwnerDefault(t *testing.T) { ...@@ -46,7 +46,7 @@ func TestOwnerDefault(t *testing.T) {
defer cleanup() defer cleanup()
var stat syscall.Stat_t var stat syscall.Stat_t
err := syscall.Lstat(wd + "/foo", &stat) err := syscall.Lstat(wd+"/foo", &stat)
CheckSuccess(err) CheckSuccess(err)
if int(stat.Uid) != os.Getuid() || int(stat.Gid) != os.Getgid() { if int(stat.Uid) != os.Getuid() || int(stat.Gid) != os.Getgid() {
...@@ -59,7 +59,7 @@ func TestOwnerRoot(t *testing.T) { ...@@ -59,7 +59,7 @@ func TestOwnerRoot(t *testing.T) {
defer cleanup() defer cleanup()
var st syscall.Stat_t var st syscall.Stat_t
err := syscall.Lstat(wd + "/foo", &st) err := syscall.Lstat(wd+"/foo", &st)
CheckSuccess(err) CheckSuccess(err)
if st.Uid != _RANDOM_OWNER || st.Gid != _RANDOM_OWNER { if st.Uid != _RANDOM_OWNER || st.Gid != _RANDOM_OWNER {
...@@ -72,7 +72,7 @@ func TestOwnerOverride(t *testing.T) { ...@@ -72,7 +72,7 @@ func TestOwnerOverride(t *testing.T) {
defer cleanup() defer cleanup()
var stat syscall.Stat_t var stat syscall.Stat_t
err := syscall.Lstat(wd + "/foo", &stat) err := syscall.Lstat(wd+"/foo", &stat)
CheckSuccess(err) CheckSuccess(err)
if stat.Uid != 42 || stat.Gid != 43 { if stat.Uid != 42 || stat.Gid != 43 {
......
...@@ -5,7 +5,6 @@ import ( ...@@ -5,7 +5,6 @@ import (
"syscall" "syscall"
) )
const ( const (
FUSE_ROOT_ID = 1 FUSE_ROOT_ID = 1
......
...@@ -82,7 +82,7 @@ func (me *AutoUnionFs) String() string { ...@@ -82,7 +82,7 @@ func (me *AutoUnionFs) String() string {
func (me *AutoUnionFs) OnMount(nodeFs *fuse.PathNodeFs) { func (me *AutoUnionFs) OnMount(nodeFs *fuse.PathNodeFs) {
me.nodeFs = nodeFs me.nodeFs = nodeFs
if me.options.UpdateOnMount { if me.options.UpdateOnMount {
time.AfterFunc(100 * time.Millisecond, func() { me.updateKnownFses() }) time.AfterFunc(100*time.Millisecond, func() { me.updateKnownFses() })
} }
} }
...@@ -356,8 +356,8 @@ func (me *AutoUnionFs) DebugData() string { ...@@ -356,8 +356,8 @@ func (me *AutoUnionFs) DebugData() string {
} }
setting := me.mountState.KernelSettings() setting := me.mountState.KernelSettings()
msg := fmt.Sprintf( msg := fmt.Sprintf(
"Version: %v\n" + "Version: %v\n"+
"Bufferpool: %v\n" + "Bufferpool: %v\n"+
"Kernel: %v\n", "Kernel: %v\n",
fuse.Version(), fuse.Version(),
me.mountState.BufferPoolStats(), me.mountState.BufferPoolStats(),
......
...@@ -14,7 +14,6 @@ import ( ...@@ -14,7 +14,6 @@ import (
"time" "time"
) )
func filePathHash(path string) string { func filePathHash(path string) string {
dir, base := filepath.Split(path) dir, base := filepath.Split(path)
......
...@@ -26,7 +26,7 @@ var testOpts = UnionFsOptions{ ...@@ -26,7 +26,7 @@ var testOpts = UnionFsOptions{
DeletionCacheTTL: entryTtl, DeletionCacheTTL: entryTtl,
DeletionDirName: "DELETIONS", DeletionDirName: "DELETIONS",
BranchCacheTTL: entryTtl, BranchCacheTTL: entryTtl,
HiddenFiles: []string{ "hidden" }, HiddenFiles: []string{"hidden"},
} }
func freezeRo(dir string) { func freezeRo(dir string) {
...@@ -763,7 +763,7 @@ func TestUnionFsRmRf(t *testing.T) { ...@@ -763,7 +763,7 @@ func TestUnionFsRmRf(t *testing.T) {
bin, err := exec.LookPath("rm") bin, err := exec.LookPath("rm")
CheckSuccess(err) CheckSuccess(err)
command := fmt.Sprintf("%s -f %s/mnt/dir", bin, wd); command := fmt.Sprintf("%s -f %s/mnt/dir", bin, wd)
log.Printf("Command: %s", command) log.Printf("Command: %s", command)
names, _ := Readdirnames(wd + "/mnt/dir") names, _ := Readdirnames(wd + "/mnt/dir")
log.Printf("Contents of %s/mnt/dir: %s", wd, strings.Join(names, ", ")) log.Printf("Contents of %s/mnt/dir: %s", wd, strings.Join(names, ", "))
......
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