aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorBjörn Jacke <bj@sernet.de>2017-05-04 22:36:16 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-05-20 08:28:40 -0400
commit1c5d8b377e58ba7d56435b4e1e355aef7999ef75 (patch)
treea5bccec655171be259920968f65722b22953d10a /fs
parent6f3b2eed8c9ad3656c60295589c1a17709e456ca (diff)
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>
Diffstat (limited to 'fs')
-rw-r--r--fs/cifs/cifs_unicode.c6
-rw-r--r--fs/cifs/cifs_unicode.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/fs/cifs/cifs_unicode.c b/fs/cifs/cifs_unicode.c
index 02b071bf3732..a0b3e7d1be48 100644
--- a/fs/cifs/cifs_unicode.c
+++ b/fs/cifs/cifs_unicode.c
@@ -83,6 +83,9 @@ convert_sfm_char(const __u16 src_char, char *target)
83 case SFM_COLON: 83 case SFM_COLON:
84 *target = ':'; 84 *target = ':';
85 break; 85 break;
86 case SFM_DOUBLEQUOTE:
87 *target = '"';
88 break;
86 case SFM_ASTERISK: 89 case SFM_ASTERISK:
87 *target = '*'; 90 *target = '*';
88 break; 91 break;
@@ -418,6 +421,9 @@ static __le16 convert_to_sfm_char(char src_char, bool end_of_string)
418 case ':': 421 case ':':
419 dest_char = cpu_to_le16(SFM_COLON); 422 dest_char = cpu_to_le16(SFM_COLON);
420 break; 423 break;
424 case '"':
425 dest_char = cpu_to_le16(SFM_DOUBLEQUOTE);
426 break;
421 case '*': 427 case '*':
422 dest_char = cpu_to_le16(SFM_ASTERISK); 428 dest_char = cpu_to_le16(SFM_ASTERISK);
423 break; 429 break;
diff --git a/fs/cifs/cifs_unicode.h b/fs/cifs/cifs_unicode.h
index a61b9166622c..07ade707fa60 100644
--- a/fs/cifs/cifs_unicode.h
+++ b/fs/cifs/cifs_unicode.h
@@ -57,6 +57,7 @@
57 * not conflict (although almost does) with the mapping above. 57 * not conflict (although almost does) with the mapping above.
58 */ 58 */
59 59
60#define SFM_DOUBLEQUOTE ((__u16) 0xF020)
60#define SFM_ASTERISK ((__u16) 0xF021) 61#define SFM_ASTERISK ((__u16) 0xF021)
61#define SFM_QUESTION ((__u16) 0xF025) 62#define SFM_QUESTION ((__u16) 0xF025)
62#define SFM_COLON ((__u16) 0xF022) 63#define SFM_COLON ((__u16) 0xF022)