mirror of
https://github.com/rclone/rclone.git
synced 2024-11-22 12:36:38 +08:00
mount: replace deprecated bazil/fuse specific constants with syscall constants
This commit is contained in:
parent
eaf593884b
commit
155f4f2e21
|
@ -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,
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue
Block a user