Skip to content

Commit 9f4ba90

Browse files
Björn Jackegregkh
authored andcommitted
CIFS: add misssing SFM mapping for doublequote
commit 85435d7a15294f9f7ef23469e6aaf7c5dfcc54f0 upstream. SFM is mapping doublequote to 0xF020 Without this patch creating files with doublequote fails to Windows/Mac Signed-off-by: Bjoern Jacke <bjacke@samba.org> Signed-off-by: Steve French <smfrench@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 9a40506 commit 9f4ba90

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

fs/cifs/cifs_unicode.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ convert_sfm_char(const __u16 src_char, char *target)
8383
case SFM_COLON:
8484
*target = ':';
8585
break;
86+
case SFM_DOUBLEQUOTE:
87+
*target = '"';
88+
break;
8689
case SFM_ASTERISK:
8790
*target = '*';
8891
break;
@@ -418,6 +421,9 @@ static __le16 convert_to_sfm_char(char src_char, bool end_of_string)
418421
case ':':
419422
dest_char = cpu_to_le16(SFM_COLON);
420423
break;
424+
case '"':
425+
dest_char = cpu_to_le16(SFM_DOUBLEQUOTE);
426+
break;
421427
case '*':
422428
dest_char = cpu_to_le16(SFM_ASTERISK);
423429
break;

fs/cifs/cifs_unicode.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
* not conflict (although almost does) with the mapping above.
5858
*/
5959

60+
#define SFM_DOUBLEQUOTE ((__u16) 0xF020)
6061
#define SFM_ASTERISK ((__u16) 0xF021)
6162
#define SFM_QUESTION ((__u16) 0xF025)
6263
#define SFM_COLON ((__u16) 0xF022)

0 commit comments

Comments
 (0)