summaryrefslogtreecommitdiff
path: root/fs/cifs/cifs_unicode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cifs/cifs_unicode.c')
-rw-r--r--fs/cifs/cifs_unicode.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/fs/cifs/cifs_unicode.c b/fs/cifs/cifs_unicode.c
index 0aa2c5c2cfe2..0303c6793d90 100644
--- a/fs/cifs/cifs_unicode.c
+++ b/fs/cifs/cifs_unicode.c
@@ -20,6 +20,7 @@
*/
#include <linux/fs.h>
#include <linux/slab.h>
+#include "cifs_fs_sb.h"
#include "cifs_unicode.h"
#include "cifs_uniupr.h"
#include "cifspdu.h"
@@ -61,6 +62,20 @@ cifs_utf16_bytes(const __le16 *from, int maxbytes,
return outlen;
}
+int cifs_remap(struct cifs_sb_info *cifs_sb)
+{
+ int map_type;
+
+ if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SFM_CHR)
+ map_type = SFM_MAP_UNI_RSVD;
+ else if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR)
+ map_type = SFU_MAP_UNI_RSVD;
+ else
+ map_type = NO_MAP_UNI_RSVD;
+
+ return map_type;
+}
+
/* Convert character using the SFU - "Services for Unix" remapping range */
static bool
convert_sfu_char(const __u16 src_char, char *target)