mount: replace deprecated bazil/fuse specific constants with syscall constants

This commit is contained in:
albertony 2023-03-25 23:27:07 +01:00
parent eaf593884b
commit 155f4f2e21
2 changed files with 4 additions and 4 deletions

View File

@ -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,

View File

@ -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: