Commit 279e23da authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

Run gofmt.

parent 2d84dd32
...@@ -69,7 +69,7 @@ func (me *DefaultRawFuseFileSystem) GetXAttr(header *InHeader, attr string) (dat ...@@ -69,7 +69,7 @@ func (me *DefaultRawFuseFileSystem) GetXAttr(header *InHeader, attr string) (dat
return nil, ENOSYS return nil, ENOSYS
} }
func (me *DefaultRawFuseFileSystem) SetXAttr(header *InHeader, input *SetXAttrIn, attr string, data []byte) (Status) { func (me *DefaultRawFuseFileSystem) SetXAttr(header *InHeader, input *SetXAttrIn, attr string, data []byte) Status {
return ENOSYS return ENOSYS
} }
...@@ -77,7 +77,7 @@ func (me *DefaultRawFuseFileSystem) ListXAttr(header *InHeader) (data []byte, co ...@@ -77,7 +77,7 @@ func (me *DefaultRawFuseFileSystem) ListXAttr(header *InHeader) (data []byte, co
return nil, ENOSYS return nil, ENOSYS
} }
func (me *DefaultRawFuseFileSystem) RemoveXAttr(header *InHeader, attr string) (Status) { func (me *DefaultRawFuseFileSystem) RemoveXAttr(header *InHeader, attr string) Status {
return ENOSYS return ENOSYS
} }
...@@ -112,7 +112,6 @@ func (me *DefaultRawFuseFileSystem) ReleaseDir(header *InHeader, f RawFuseDir) { ...@@ -112,7 +112,6 @@ func (me *DefaultRawFuseFileSystem) ReleaseDir(header *InHeader, f RawFuseDir) {
} }
//////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////
// DefaultRawFuseFile // DefaultRawFuseFile
...@@ -162,7 +161,7 @@ func (me *DefaultPathFilesystem) GetXAttr(name string, attr string) ([]byte, Sta ...@@ -162,7 +161,7 @@ func (me *DefaultPathFilesystem) GetXAttr(name string, attr string) ([]byte, Sta
return nil, ENOSYS return nil, ENOSYS
} }
func (me *DefaultPathFilesystem) SetXAttr(name string, attr string, data []byte, flags int) (Status) { func (me *DefaultPathFilesystem) SetXAttr(name string, attr string, data []byte, flags int) Status {
return ENOSYS return ENOSYS
} }
...@@ -170,7 +169,7 @@ func (me *DefaultPathFilesystem) ListXAttr(name string) ([]string, Status) { ...@@ -170,7 +169,7 @@ func (me *DefaultPathFilesystem) ListXAttr(name string) ([]string, Status) {
return nil, ENOSYS return nil, ENOSYS
} }
func (me *DefaultPathFilesystem) RemoveXAttr(name string, attr string) (Status) { func (me *DefaultPathFilesystem) RemoveXAttr(name string, attr string) Status {
return ENOSYS return ENOSYS
} }
......
...@@ -158,7 +158,7 @@ func (me *LoopbackFileSystem) ListXAttr(name string) ([]string, Status) { ...@@ -158,7 +158,7 @@ func (me *LoopbackFileSystem) ListXAttr(name string) ([]string, Status) {
return data, Status(errNo) return data, Status(errNo)
} }
func (me *LoopbackFileSystem) RemoveXAttr(name string, attr string) (Status) { func (me *LoopbackFileSystem) RemoveXAttr(name string, attr string) Status {
return Status(Removexattr(me.GetPath(name), attr)) return Status(Removexattr(me.GetPath(name), attr))
} }
......
...@@ -726,7 +726,7 @@ func (me *PathFileSystemConnector) GetXAttr(header *InHeader, attribute string) ...@@ -726,7 +726,7 @@ func (me *PathFileSystemConnector) GetXAttr(header *InHeader, attribute string)
return data, code return data, code
} }
func (me *PathFileSystemConnector) RemoveXAttr(header *InHeader, attr string) (Status) { func (me *PathFileSystemConnector) RemoveXAttr(header *InHeader, attr string) Status {
path, mount := me.GetPath(header.NodeId) path, mount := me.GetPath(header.NodeId)
if mount == nil { if mount == nil {
return ENOENT return ENOENT
...@@ -735,7 +735,7 @@ func (me *PathFileSystemConnector) RemoveXAttr(header *InHeader, attr string) (S ...@@ -735,7 +735,7 @@ func (me *PathFileSystemConnector) RemoveXAttr(header *InHeader, attr string) (S
return mount.fs.RemoveXAttr(path, attr) return mount.fs.RemoveXAttr(path, attr)
} }
func (me *PathFileSystemConnector) SetXAttr(header *InHeader, input *SetXAttrIn, attr string, data []byte) (Status) { func (me *PathFileSystemConnector) SetXAttr(header *InHeader, input *SetXAttrIn, attr string, data []byte) Status {
path, mount := me.GetPath(header.NodeId) path, mount := me.GetPath(header.NodeId)
if mount == nil { if mount == nil {
return ENOENT return ENOENT
......
...@@ -106,7 +106,7 @@ func (me *TimingPathFilesystem) ListXAttr(name string) ([]string, Status) { ...@@ -106,7 +106,7 @@ func (me *TimingPathFilesystem) ListXAttr(name string) ([]string, Status) {
return me.original.ListXAttr(name) return me.original.ListXAttr(name)
} }
func (me *TimingPathFilesystem) RemoveXAttr(name string, attr string) (Status) { func (me *TimingPathFilesystem) RemoveXAttr(name string, attr string) Status {
defer me.startTimer("RemoveXAttr", name)() defer me.startTimer("RemoveXAttr", name)()
return me.original.RemoveXAttr(name, attr) return me.original.RemoveXAttr(name, attr)
} }
...@@ -200,4 +200,3 @@ func (me *TimingPathFilesystem) Utimens(name string, AtimeNs uint64, CtimeNs uin ...@@ -200,4 +200,3 @@ func (me *TimingPathFilesystem) Utimens(name string, AtimeNs uint64, CtimeNs uin
defer me.startTimer("Utimens", name)() defer me.startTimer("Utimens", name)()
return me.original.Utimens(name, AtimeNs, CtimeNs) return me.original.Utimens(name, AtimeNs, CtimeNs)
} }
...@@ -136,7 +136,7 @@ func (me *TimingRawFilesystem) ListXAttr(header *InHeader) (data []byte, code St ...@@ -136,7 +136,7 @@ func (me *TimingRawFilesystem) ListXAttr(header *InHeader) (data []byte, code St
return me.original.ListXAttr(header) return me.original.ListXAttr(header)
} }
func (me *TimingRawFilesystem) RemoveXAttr(header *InHeader, attr string) (Status) { func (me *TimingRawFilesystem) RemoveXAttr(header *InHeader, attr string) Status {
defer me.startTimer("RemoveXAttr")() defer me.startTimer("RemoveXAttr")()
return me.original.RemoveXAttr(header, attr) return me.original.RemoveXAttr(header, attr)
} }
...@@ -180,4 +180,3 @@ func (me *TimingRawFilesystem) ReleaseDir(header *InHeader, f RawFuseDir) { ...@@ -180,4 +180,3 @@ func (me *TimingRawFilesystem) ReleaseDir(header *InHeader, f RawFuseDir) {
defer me.startTimer("ReleaseDir")() defer me.startTimer("ReleaseDir")()
me.original.ReleaseDir(header, f) me.original.ReleaseDir(header, f)
} }
...@@ -518,7 +518,7 @@ type RawFileSystem interface { ...@@ -518,7 +518,7 @@ type RawFileSystem interface {
GetXAttr(header *InHeader, attr string) (data []byte, code Status) GetXAttr(header *InHeader, attr string) (data []byte, code Status)
ListXAttr(header *InHeader) (attributes []byte, code Status) ListXAttr(header *InHeader) (attributes []byte, code Status)
SetXAttr(header *InHeader, input *SetXAttrIn, attr string, data []byte) (Status) SetXAttr(header *InHeader, input *SetXAttrIn, attr string, data []byte) Status
RemoveXAttr(header *InHeader, attr string) (code Status) RemoveXAttr(header *InHeader, attr string) (code Status)
Access(header *InHeader, input *AccessIn) (code Status) Access(header *InHeader, input *AccessIn) (code Status)
Create(header *InHeader, input *CreateIn, name string) (flags uint32, fuseFile RawFuseFile, out *EntryOut, code Status) Create(header *InHeader, input *CreateIn, name string) (flags uint32, fuseFile RawFuseFile, out *EntryOut, code Status)
...@@ -567,7 +567,7 @@ type PathFilesystem interface { ...@@ -567,7 +567,7 @@ type PathFilesystem interface {
GetXAttr(name string, attribute string) (data []byte, code Status) GetXAttr(name string, attribute string) (data []byte, code Status)
SetXAttr(name string, attr string, data []byte, flags int) Status SetXAttr(name string, attr string, data []byte, flags int) Status
ListXAttr(name string) (attributes []string, code Status) ListXAttr(name string) (attributes []string, code Status)
RemoveXAttr(name string, attr string) (Status) RemoveXAttr(name string, attr string) Status
// Where to hook up statfs? // Where to hook up statfs?
......
...@@ -88,7 +88,7 @@ func (me *WrappingPathFilesystem) ListXAttr(name string) ([]string, Status) { ...@@ -88,7 +88,7 @@ func (me *WrappingPathFilesystem) ListXAttr(name string) ([]string, Status) {
return me.original.ListXAttr(name) return me.original.ListXAttr(name)
} }
func (me *WrappingPathFilesystem) RemoveXAttr(name string, attr string) (Status) { func (me *WrappingPathFilesystem) RemoveXAttr(name string, attr string) Status {
return me.original.RemoveXAttr(name, attr) return me.original.RemoveXAttr(name, attr)
} }
...@@ -172,7 +172,7 @@ func (me *WrappingRawFilesystem) ListXAttr(header *InHeader) (data []byte, code ...@@ -172,7 +172,7 @@ func (me *WrappingRawFilesystem) ListXAttr(header *InHeader) (data []byte, code
return me.original.ListXAttr(header) return me.original.ListXAttr(header)
} }
func (me *WrappingRawFilesystem) RemoveXAttr(header *InHeader, attr string) (Status) { func (me *WrappingRawFilesystem) RemoveXAttr(header *InHeader, attr string) Status {
return me.original.RemoveXAttr(header, attr) return me.original.RemoveXAttr(header, attr)
} }
......
...@@ -8,6 +8,7 @@ import ( ...@@ -8,6 +8,7 @@ import (
"os" "os"
"syscall" "syscall"
) )
var _ = log.Print var _ = log.Print
type XAttrTestFs struct { type XAttrTestFs struct {
...@@ -37,7 +38,7 @@ func (me *XAttrTestFs) GetAttr(name string) (*Attr, Status) { ...@@ -37,7 +38,7 @@ func (me *XAttrTestFs) GetAttr(name string) (*Attr, Status) {
return nil, ENOENT return nil, ENOENT
} }
func (me *XAttrTestFs) SetXAttr(name string, attr string, data []byte, flags int) (Status) { func (me *XAttrTestFs) SetXAttr(name string, attr string, data []byte, flags int) Status {
if name != me.filename { if name != me.filename {
return ENOENT return ENOENT
} }
...@@ -68,7 +69,7 @@ func (me *XAttrTestFs) ListXAttr(name string) (data []string, code Status) { ...@@ -68,7 +69,7 @@ func (me *XAttrTestFs) ListXAttr(name string) (data []string, code Status) {
return data, OK return data, OK
} }
func (me *XAttrTestFs) RemoveXAttr(name string, attr string) (Status) { func (me *XAttrTestFs) RemoveXAttr(name string, attr string) Status {
if name != me.filename { if name != me.filename {
return ENOENT return ENOENT
} }
...@@ -128,7 +129,7 @@ func TestXAttrRead(t *testing.T) { ...@@ -128,7 +129,7 @@ func TestXAttrRead(t *testing.T) {
if len(readback) != len(golden) { if len(readback) != len(golden) {
t.Error("length mismatch", golden, readback) t.Error("length mismatch", golden, readback)
} else { } else {
for k, v := range(readback) { for k, v := range readback {
if bytes.Compare(golden[k], v) != 0 { if bytes.Compare(golden[k], v) != 0 {
t.Error("val mismatch", k, v, golden[k]) t.Error("val mismatch", k, v, golden[k])
} }
...@@ -147,4 +148,3 @@ func TestXAttrRead(t *testing.T) { ...@@ -147,4 +148,3 @@ func TestXAttrRead(t *testing.T) {
t.Error("Data not removed?", errno, val) t.Error("Data not removed?", errno, val)
} }
} }
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