aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/cifs/cifs_unicode.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/cifs/cifs_unicode.c b/fs/cifs/cifs_unicode.c
index a0b3e7d1be48..e0445e2075b2 100644
--- a/fs/cifs/cifs_unicode.c
+++ b/fs/cifs/cifs_unicode.c
@@ -79,6 +79,10 @@ convert_sfu_char(const __u16 src_char, char *target)
79static bool 79static bool
80convert_sfm_char(const __u16 src_char, char *target) 80convert_sfm_char(const __u16 src_char, char *target)
81{ 81{
82 if (src_char >= 0xF001 && src_char <= 0xF01F) {
83 *target = src_char - 0xF000;
84 return true;
85 }
82 switch (src_char) { 86 switch (src_char) {
83 case SFM_COLON: 87 case SFM_COLON:
84 *target = ':'; 88 *target = ':';
@@ -417,6 +421,10 @@ static __le16 convert_to_sfm_char(char src_char, bool end_of_string)
417{ 421{
418 __le16 dest_char; 422 __le16 dest_char;
419 423
424 if (src_char >= 0x01 && src_char <= 0x1F) {
425 dest_char = cpu_to_le16(src_char + 0xF000);
426 return dest_char;
427 }
420 switch (src_char) { 428 switch (src_char) {
421 case ':': 429 case ':':
422 dest_char = cpu_to_le16(SFM_COLON); 430 dest_char = cpu_to_le16(SFM_COLON);