cifs: map NT_STATUS_ERROR_WRITE_PROTECTED to -EROFS
authorJeff Layton <jlayton@redhat.com>
Mon, 26 Jul 2010 14:29:57 +0000 (10:29 -0400)
committerSteve French <sfrench@us.ibm.com>
Mon, 2 Aug 2010 12:40:40 +0000 (12:40 +0000)
Seems like a more sensible mapping than -EIO.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
fs/cifs/netmisc.c
fs/cifs/smberr.h

index 3489468d070bc0a823321e5ac4084ce0f53ed6b2..c6721ee26dbcb77aca9acf528efb1226de9eebea 100644 (file)
@@ -61,6 +61,7 @@ static const struct smb_to_posix_error mapping_table_ERRDOS[] = {
        {ERRremcd, -EACCES},
        {ERRdiffdevice, -EXDEV},
        {ERRnofiles, -ENOENT},
+       {ERRwriteprot, -EROFS},
        {ERRbadshare, -ETXTBSY},
        {ERRlock, -EACCES},
        {ERRunsup, -EINVAL},
index c5084d27db7c10ab28dd6e8903d8f8d201046c2b..7f16cb825fe59d654639177dac63ec5382bf361c 100644 (file)
@@ -76,6 +76,7 @@
 #define ERRnofiles             18      /* A File Search command can find no
                                           more files matching the specified
                                           criteria. */
+#define ERRwriteprot           19      /* media is write protected */
 #define ERRgeneral             31
 #define ERRbadshare            32      /* The sharing mode specified for an
                                           Open conflicts with existing FIDs on