qubes-linux-kernel/patches.fixes/novfs-return-ENOTEMPTY-when-deleting-nonempty-dir

38 lines
1.1 KiB
Plaintext
Raw Normal View History

From: Sankar P <psankar@novell.com>
Subject: fs: novfs: Return ENOTEMPTY when tyring to delete a non-empty folder
References: bnc#583964
Patch-mainline: no
The patch returns the ENOTEMPTY error code, when an user issues
delete command on a non-empty folder. This fix makes Nautilus
behave correctly in novfs, just like other file-systems.
Signed-off-by: Sankar P <psankar@novell.com>
Acked-by: Jan Kara <jack@suse.cz>
---
2011-04-19 20:09:59 +00:00
fs/novfs/file.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
--- a/fs/novfs/file.c
+++ b/fs/novfs/file.c
2011-04-19 20:09:59 +00:00
@@ -1569,11 +1569,16 @@ int novfs_delete(unsigned char * Path, i
if (reply) {
retCode = 0;
if (reply->Reply.ErrorCode) {
- if ((reply->Reply.ErrorCode & 0xFFFF) == 0x0006) { /* Access Denied Error */
+
+ /* Refer to the file ncp.c, in xtier's
+ * NCP89_08 Function for various error codes */
+
+ if ((reply->Reply.ErrorCode & 0xFFFF) == 0x0006)
retCode = -EACCES;
- } else {
+ else if ((reply->Reply.ErrorCode & 0xFFFF) == 0x0513)
+ retCode = -ENOTEMPTY;
+ else
retCode = -EIO;
- }
}
kfree(reply);
}