From 3572d2857f61f720082740cc17e2d99b45e7af7f Mon Sep 17 00:00:00 2001 From: Jeff Layton Date: Mon, 26 Jul 2010 10:29:57 -0400 Subject: [PATCH] cifs: map NT_STATUS_ERROR_WRITE_PROTECTED to -EROFS Seems like a more sensible mapping than -EIO. Signed-off-by: Jeff Layton Signed-off-by: Steve French --- fs/cifs/netmisc.c | 1 + fs/cifs/smberr.h | 1 + 2 files changed, 2 insertions(+) diff --git a/fs/cifs/netmisc.c b/fs/cifs/netmisc.c index 3489468d070..c6721ee26db 100644 --- a/fs/cifs/netmisc.c +++ b/fs/cifs/netmisc.c @@ -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}, diff --git a/fs/cifs/smberr.h b/fs/cifs/smberr.h index c5084d27db7..7f16cb825fe 100644 --- a/fs/cifs/smberr.h +++ b/fs/cifs/smberr.h @@ -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