Skip to contentSkip to conversation

CIFS: add misssing SFM mapping for doublequote

PATCH New Björn JACKE 1 participant 1 message May 5, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 CIFS: add misssing SFM mapping for doublequote

Hi,

please review and apply to current and long-term kernels like 4.9, please.

Björn

From 7a72fdf400c039218526ac4241efb2db984e1a13 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Jacke?= <[email protected]>
Date: Fri, 5 May 2017 04:36:16 +0200
Subject: [PATCH] CIFS: add misssing SFM mapping for doublequote

SFM is mapping doublequote to 0xF020

---
 fs/cifs/cifs_unicode.c | 6 ++++++
 fs/cifs/cifs_unicode.h | 1 +
 2 files changed, 7 insertions(+)
fs/cifs/cifs_unicode.c +6 -0
index 02b071bf..a0b3e7d 100644
@@ -83,6 +83,9 @@ convert_sfm_char(const __u16 src_char, char *target)
 	case SFM_COLON:
 		*target = ':';
 		break;
+	case SFM_DOUBLEQUOTE:
+		*target = '"';
+		break;
 	case SFM_ASTERISK:
 		*target = '*';
 		break;
@@ -418,6 +421,9 @@ static __le16 convert_to_sfm_char(char src_char, bool end_of_string)
 	case ':':
 		dest_char = cpu_to_le16(SFM_COLON);
 		break;
+	case '"':
+		dest_char = cpu_to_le16(SFM_DOUBLEQUOTE);
+		break;
 	case '*':
 		dest_char = cpu_to_le16(SFM_ASTERISK);
 		break;
fs/cifs/cifs_unicode.h +1 -0
index 7bfb76e..8a79a34 100644
@@ -57,6 +57,7 @@
  * not conflict (although almost does) with the mapping above.
  */
 
+#define SFM_DOUBLEQUOTE ((__u16) 0xF020)
 #define SFM_ASTERISK    ((__u16) 0xF021)
 #define SFM_QUESTION    ((__u16) 0xF025)
 #define SFM_COLON       ((__u16) 0xF022)
Signature · 1 line
2.7.4