aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchrislusf <chris.lu@gmail.com>2015-02-05 23:11:27 -0800
committerchrislusf <chris.lu@gmail.com>2015-02-05 23:11:27 -0800
commit714ccb6e2b709355bed617947ccaa6ad4b68b77b (patch)
tree9eca38c172c81bb385ffd970c948a851450d9bbb
parent1a04522e182f620447acf90f0237a81cc59c40ae (diff)
downloadseaweedfs-714ccb6e2b709355bed617947ccaa6ad4b68b77b.tar.xz
seaweedfs-714ccb6e2b709355bed617947ccaa6ad4b68b77b.zip
Fix compilation error due to upstream API change.
Fix compilation error due to upstream API change.
-rw-r--r--go/weed/mount_std.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/go/weed/mount_std.go b/go/weed/mount_std.go
index 808c6c563..8b5ffefcb 100644
--- a/go/weed/mount_std.go
+++ b/go/weed/mount_std.go
@@ -13,6 +13,7 @@ import (
"github.com/chrislusf/weed-fs/go/glog"
"github.com/chrislusf/weed-fs/go/storage"
"github.com/chrislusf/weed-fs/go/util"
+ "golang.org/x/net/context"
)
func runMount(cmd *Command, args []string) bool {
@@ -55,7 +56,7 @@ type File struct {
func (File) Attr() fuse.Attr {
return fuse.Attr{Mode: 0444}
}
-func (File) ReadAll(intr fs.Intr) ([]byte, fuse.Error) {
+func (File) ReadAll(ctx context.Context) ([]byte, error) {
return []byte("hello, world\n"), nil
}
@@ -68,7 +69,7 @@ func (dir Dir) Attr() fuse.Attr {
return fuse.Attr{Inode: dir.Id, Mode: os.ModeDir | 0555}
}
-func (dir Dir) Lookup(name string, intr fs.Intr) (fs.Node, fuse.Error) {
+func (dir Dir) Lookup(ctx context.Context, name string) (fs.Node, error) {
files_result, e := filer.ListFiles(*mountOptions.filer, dir.Path, name)
if e != nil {
return nil, fuse.ENOENT
@@ -81,11 +82,11 @@ func (dir Dir) Lookup(name string, intr fs.Intr) (fs.Node, fuse.Error) {
type WFS struct{}
-func (WFS) Root() (fs.Node, fuse.Error) {
+func (WFS) Root() (fs.Node, error) {
return Dir{}, nil
}
-func (dir *Dir) ReadDir(intr fs.Intr) ([]fuse.Dirent, fuse.Error) {
+func (dir *Dir) ReadDir(ctx context.Context) ([]fuse.Dirent, error) {
ret := make([]fuse.Dirent, 0)
if dirs, e := filer.ListDirectories(*mountOptions.filer, dir.Path); e == nil {
for _, d := range dirs.Directories {