43 lines
1.2 KiB
Plaintext
43 lines
1.2 KiB
Plaintext
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>
|
|
---
|
|
tmp/linux-2.6.32-sle11-sp1/fs/novfs/file.c | 11 ++++++++---
|
|
1 files changed, 8 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/fs/novfs/file.c b/fs/novfs/file.c
|
|
index b7033ff..5da32ca 100644
|
|
--- a/fs/novfs/file.c
|
|
+++ b/fs/novfs/file.c
|
|
@@ -1569,11 +1569,16 @@ int novfs_delete(unsigned char * Path, int DirectoryFlag, struct novfs_schandle
|
|
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);
|
|
}
|
|
--
|
|
1.6.4.2
|
|
|