Commit 7e46f090 authored by Björn JACKE's avatar Björn JACKE Committed by Steve French

CIFS: add SFM mapping for 0x01-0x1F

Hi,

attached patch adds more missing mappings for the 0x01-0x1f range. Please
review, if you're fine with it, considere it also for stable.

Björn

>From a97720c26db2ee77d4e798e3d383fcb6a348bd29 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Jacke?= <bjacke@samba.org>
Date: Wed, 31 May 2017 22:48:41 +0200
Subject: [PATCH] cifs: add SFM mapping for 0x01-0x1F

0x1-0x1F has to be mapped to 0xF001-0xF01F
Signed-off-by: default avatarBjoern Jacke <bjacke@samba.org>
Signed-off-by: default avatarSteve French <smfrench@gmail.com>
parent 84908426
...@@ -79,6 +79,10 @@ convert_sfu_char(const __u16 src_char, char *target) ...@@ -79,6 +79,10 @@ convert_sfu_char(const __u16 src_char, char *target)
static bool static bool
convert_sfm_char(const __u16 src_char, char *target) convert_sfm_char(const __u16 src_char, char *target)
{ {
if (src_char >= 0xF001 && src_char <= 0xF01F) {
*target = src_char - 0xF000;
return true;
}
switch (src_char) { switch (src_char) {
case SFM_COLON: case SFM_COLON:
*target = ':'; *target = ':';
...@@ -417,6 +421,10 @@ static __le16 convert_to_sfm_char(char src_char, bool end_of_string) ...@@ -417,6 +421,10 @@ static __le16 convert_to_sfm_char(char src_char, bool end_of_string)
{ {
__le16 dest_char; __le16 dest_char;
if (src_char >= 0x01 && src_char <= 0x1F) {
dest_char = cpu_to_le16(src_char + 0xF000);
return dest_char;
}
switch (src_char) { switch (src_char) {
case ':': case ':':
dest_char = cpu_to_le16(SFM_COLON); dest_char = cpu_to_le16(SFM_COLON);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment