From: Ross Lagerwall Date: Fri, 8 Aug 2014 19:14:44 +0000 (+0100) Subject: Map NFS3ERR_NOTEMPTY to ENOTEMPTY X-Git-Tag: upstream/1.9.6^2~10^2 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=11cf77cecaf631dde5c08a1bd886346dfb9aa6dc;p=deb_libnfs.git Map NFS3ERR_NOTEMPTY to ENOTEMPTY Map NFS3ERR_NOTEMPTY to ENOTEMPTY rather than EEXIST. POSIX allows either EEXIST or ENOTEMPTY for rmdir on a non-empty directory but ENOTEMPTY is more explicit and in line with Linux, OS X, FreeBSD and OpenBSD's behavior. Signed-off-by: Ross Lagerwall --- diff --git a/nfs/nfs.c b/nfs/nfs.c index a97d40a..286ced0 100644 --- a/nfs/nfs.c +++ b/nfs/nfs.c @@ -86,7 +86,7 @@ int nfsstat3_to_errno(int error) case NFS3ERR_ROFS: return -EROFS; break; case NFS3ERR_MLINK: return -EMLINK; break; case NFS3ERR_NAMETOOLONG: return -ENAMETOOLONG; break; - case NFS3ERR_NOTEMPTY: return -EEXIST; break; + case NFS3ERR_NOTEMPTY: return -ENOTEMPTY; break; case NFS3ERR_DQUOT: return -ERANGE; break; case NFS3ERR_STALE: return -EIO; break; case NFS3ERR_REMOTE: return -EIO; break;