diff --git a/errors.go b/errors.go index 316234f..3fd3ba4 100644 --- a/errors.go +++ b/errors.go @@ -23,6 +23,7 @@ import ( const ( // Errors corresponding to kernel error numbers. These may be treated // specially by fuseops.Op.Respond methods. + EEXIST = bazilfuse.EEXIST EINVAL = bazilfuse.Errno(syscall.EINVAL) EIO = bazilfuse.EIO ENOENT = bazilfuse.ENOENT diff --git a/samples/memfs/memfs.go b/samples/memfs/memfs.go index 1aa4079..beacc4c 100644 --- a/samples/memfs/memfs.go +++ b/samples/memfs/memfs.go @@ -345,7 +345,7 @@ func (fs *memFS) CreateFile( // duplicate. _, exists := parent.LookUpChild(op.Name) if exists { - err = fmt.Errorf("Name %q already exists in parent", op.Name) + err = fuse.EEXIST return }