mount: quota adjust error type to be syscall.ENOSPC

This commit is contained in:
chrislu
2022-03-06 17:04:21 -08:00
parent c7e8ac18f0
commit f3442e36e6
9 changed files with 14 additions and 9 deletions

View File

@@ -3,6 +3,7 @@ package mount
import (
"github.com/hanwen/go-fuse/v2/fuse"
"net/http"
"syscall"
)
/**
@@ -34,7 +35,7 @@ import (
func (wfs *WFS) Write(cancel <-chan struct{}, in *fuse.WriteIn, data []byte) (written uint32, code fuse.Status) {
if wfs.IsOverQuota {
return 0, fuse.EPERM
return 0, fuse.Status(syscall.ENOSPC)
}
fh := wfs.GetHandle(FileHandleId(in.Fh))