From 155f4f2e21359407543429f9fa73400158061198 Mon Sep 17 00:00:00 2001 From: albertony <12441419+albertony@users.noreply.github.com> Date: Sat, 25 Mar 2023 23:27:07 +0100 Subject: [PATCH] mount: replace deprecated bazil/fuse specific constants with syscall constants --- cmd/mount/dir.go | 2 +- cmd/mount/fs.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/mount/dir.go b/cmd/mount/dir.go index b82b52179..775edd4e6 100644 --- a/cmd/mount/dir.go +++ b/cmd/mount/dir.go @@ -250,7 +250,7 @@ func (d *Dir) Mknod(ctx context.Context, req *fuse.MknodRequest) (node fusefs.No defer log.Trace(d, "name=%v, mode=%d, rdev=%d", req.Name, req.Mode, req.Rdev)("node=%v, err=%v", &node, &err) if req.Rdev != 0 { fs.Errorf(d, "Can't create device node %q", req.Name) - return nil, fuse.EIO + return nil, fuse.Errno(syscall.EIO) } var cReq = fuse.CreateRequest{ Name: req.Name, diff --git a/cmd/mount/fs.go b/cmd/mount/fs.go index c89110ecc..ee5897e92 100644 --- a/cmd/mount/fs.go +++ b/cmd/mount/fs.go @@ -82,11 +82,11 @@ func translateError(err error) error { case vfs.OK: return nil case vfs.ENOENT, fs.ErrorDirNotFound, fs.ErrorObjectNotFound: - return fuse.ENOENT + return fuse.Errno(syscall.ENOENT) case vfs.EEXIST, fs.ErrorDirExists: - return fuse.EEXIST + return fuse.Errno(syscall.EEXIST) case vfs.EPERM, fs.ErrorPermissionDenied: - return fuse.EPERM + return fuse.Errno(syscall.EPERM) case vfs.ECLOSED: return fuse.Errno(syscall.EBADF) case vfs.ENOTEMPTY: