On Mon, Jul 26, 2010 at 9:29 AM, Jeff Layton <jlayton@xxxxxxxxxx> wrote: > Seems like a more sensible mapping than -EIO. I agree. Also helps common case of Samba exporting read only shares by default. > Signed-off-by: Jeff Layton <jlayton@xxxxxxxxxx> > --- > fs/cifs/netmisc.c | 1 + > fs/cifs/smberr.h | 1 + > 2 files changed, 2 insertions(+), 0 deletions(-) > > diff --git a/fs/cifs/netmisc.c b/fs/cifs/netmisc.c > index 3489468..c6721ee 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 c5084d2..7f16cb8 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 > -- > 1.7.1.1 > > -- Thanks, Steve -- To unsubscribe from this list: send the line "unsubscribe linux-cifs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html