mirror of
https://github.com/rclone/rclone.git
synced 2024-11-23 00:43:49 +01: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)
|
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 {
|
if req.Rdev != 0 {
|
||||||
fs.Errorf(d, "Can't create device node %q", req.Name)
|
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{
|
var cReq = fuse.CreateRequest{
|
||||||
Name: req.Name,
|
Name: req.Name,
|
||||||
|
@ -82,11 +82,11 @@ func translateError(err error) error {
|
|||||||
case vfs.OK:
|
case vfs.OK:
|
||||||
return nil
|
return nil
|
||||||
case vfs.ENOENT, fs.ErrorDirNotFound, fs.ErrorObjectNotFound:
|
case vfs.ENOENT, fs.ErrorDirNotFound, fs.ErrorObjectNotFound:
|
||||||
return fuse.ENOENT
|
return fuse.Errno(syscall.ENOENT)
|
||||||
case vfs.EEXIST, fs.ErrorDirExists:
|
case vfs.EEXIST, fs.ErrorDirExists:
|
||||||
return fuse.EEXIST
|
return fuse.Errno(syscall.EEXIST)
|
||||||
case vfs.EPERM, fs.ErrorPermissionDenied:
|
case vfs.EPERM, fs.ErrorPermissionDenied:
|
||||||
return fuse.EPERM
|
return fuse.Errno(syscall.EPERM)
|
||||||
case vfs.ECLOSED:
|
case vfs.ECLOSED:
|
||||||
return fuse.Errno(syscall.EBADF)
|
return fuse.Errno(syscall.EBADF)
|
||||||
case vfs.ENOTEMPTY:
|
case vfs.ENOTEMPTY:
|
||||||
|
Loading…
Reference in New Issue
Block a user