Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

fs/smb: Swing unicode common code from smb->NLS

Swing most of the inline functions and unicode tables into nls
from the copy in smb/server. This is UCS-2 rather than most
of the rest of the code in NLS, but it currently seems like the
best place for it.

The actual unicode.c implementations vary much more between server
and client so they're unmoved.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Reviewed-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Signed-off-by: Steve French <stfrench@microsoft.com>

authored by

Dr. David Alan Gilbert and committed by
Steve French
089f7f59 9e749389

+328 -284
+8
fs/nls/Kconfig
··· 617 617 input/output character sets. Say Y here for the UTF-8 encoding of 618 618 the Unicode/ISO9646 universal character set. 619 619 620 + config NLS_UCS2_UTILS 621 + tristate "NLS UCS-2 UTILS" 622 + help 623 + Set of older UCS-2 conversion utilities and tables used by some 624 + filesystems including SMB/CIFS. This includes upper case conversion 625 + tables. This will automatically be selected when the filesystem 626 + that uses it is selected. 627 + 620 628 endif # NLS
+1
fs/nls/Makefile
··· 54 54 obj-$(CONFIG_NLS_MAC_ROMANIAN) += mac-romanian.o 55 55 obj-$(CONFIG_NLS_MAC_ROMAN) += mac-roman.o 56 56 obj-$(CONFIG_NLS_MAC_TURKISH) += mac-turkish.o 57 + obj-$(CONFIG_NLS_UCS2_UTILS) += nls_ucs2_utils.o
+297
fs/nls/nls_ucs2_utils.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0-or-later */ 2 + /* 3 + * Some of the source code in this file came from fs/cifs/cifs_unicode.c 4 + * and then via server/unicode.c 5 + * cifs_unicode: Unicode kernel case support 6 + * 7 + * Function: 8 + * Convert a unicode character to upper or lower case using 9 + * compressed tables. 10 + * 11 + * Copyright (c) International Business Machines Corp., 2000,2009 12 + * 13 + * 14 + * Notes: 15 + * These APIs are based on the C library functions. The semantics 16 + * should match the C functions but with expanded size operands. 17 + * 18 + * The upper/lower functions are based on a table created by mkupr. 19 + * This is a compressed table of upper and lower case conversion. 20 + * 21 + */ 22 + #ifndef _NLS_UCS2_UTILS_H 23 + #define _NLS_UCS2_UTILS_H 24 + 25 + #include <asm/byteorder.h> 26 + #include <linux/types.h> 27 + #include <linux/nls.h> 28 + #include <linux/unicode.h> 29 + 30 + /* 31 + * Windows maps these to the user defined 16 bit Unicode range since they are 32 + * reserved symbols (along with \ and /), otherwise illegal to store 33 + * in filenames in NTFS 34 + */ 35 + #define UNI_ASTERISK ((__u16)('*' + 0xF000)) 36 + #define UNI_QUESTION ((__u16)('?' + 0xF000)) 37 + #define UNI_COLON ((__u16)(':' + 0xF000)) 38 + #define UNI_GRTRTHAN ((__u16)('>' + 0xF000)) 39 + #define UNI_LESSTHAN ((__u16)('<' + 0xF000)) 40 + #define UNI_PIPE ((__u16)('|' + 0xF000)) 41 + #define UNI_SLASH ((__u16)('\\' + 0xF000)) 42 + 43 + #ifndef UNICASERANGE_DEFINED 44 + struct UniCaseRange { 45 + wchar_t start; 46 + wchar_t end; 47 + signed char *table; 48 + }; 49 + #endif /* UNICASERANGE_DEFINED */ 50 + 51 + #ifndef UNIUPR_NOUPPER 52 + extern signed char NlsUniUpperTable[512]; 53 + extern const struct UniCaseRange NlsUniUpperRange[]; 54 + #endif /* UNIUPR_NOUPPER */ 55 + 56 + /* 57 + * UniStrcat: Concatenate the second string to the first 58 + * 59 + * Returns: 60 + * Address of the first string 61 + */ 62 + static inline wchar_t *UniStrcat(wchar_t *ucs1, const wchar_t *ucs2) 63 + { 64 + wchar_t *anchor = ucs1; /* save a pointer to start of ucs1 */ 65 + 66 + while (*ucs1++) 67 + /*NULL*/; /* To end of first string */ 68 + ucs1--; /* Return to the null */ 69 + while ((*ucs1++ = *ucs2++)) 70 + /*NULL*/; /* copy string 2 over */ 71 + return anchor; 72 + } 73 + 74 + /* 75 + * UniStrchr: Find a character in a string 76 + * 77 + * Returns: 78 + * Address of first occurrence of character in string 79 + * or NULL if the character is not in the string 80 + */ 81 + static inline wchar_t *UniStrchr(const wchar_t *ucs, wchar_t uc) 82 + { 83 + while ((*ucs != uc) && *ucs) 84 + ucs++; 85 + 86 + if (*ucs == uc) 87 + return (wchar_t *)ucs; 88 + return NULL; 89 + } 90 + 91 + /* 92 + * UniStrcmp: Compare two strings 93 + * 94 + * Returns: 95 + * < 0: First string is less than second 96 + * = 0: Strings are equal 97 + * > 0: First string is greater than second 98 + */ 99 + static inline int UniStrcmp(const wchar_t *ucs1, const wchar_t *ucs2) 100 + { 101 + while ((*ucs1 == *ucs2) && *ucs1) { 102 + ucs1++; 103 + ucs2++; 104 + } 105 + return (int)*ucs1 - (int)*ucs2; 106 + } 107 + 108 + /* 109 + * UniStrcpy: Copy a string 110 + */ 111 + static inline wchar_t *UniStrcpy(wchar_t *ucs1, const wchar_t *ucs2) 112 + { 113 + wchar_t *anchor = ucs1; /* save the start of result string */ 114 + 115 + while ((*ucs1++ = *ucs2++)) 116 + /*NULL*/; 117 + return anchor; 118 + } 119 + 120 + /* 121 + * UniStrlen: Return the length of a string (in 16 bit Unicode chars not bytes) 122 + */ 123 + static inline size_t UniStrlen(const wchar_t *ucs1) 124 + { 125 + int i = 0; 126 + 127 + while (*ucs1++) 128 + i++; 129 + return i; 130 + } 131 + 132 + /* 133 + * UniStrnlen: Return the length (in 16 bit Unicode chars not bytes) of a 134 + * string (length limited) 135 + */ 136 + static inline size_t UniStrnlen(const wchar_t *ucs1, int maxlen) 137 + { 138 + int i = 0; 139 + 140 + while (*ucs1++) { 141 + i++; 142 + if (i >= maxlen) 143 + break; 144 + } 145 + return i; 146 + } 147 + 148 + /* 149 + * UniStrncat: Concatenate length limited string 150 + */ 151 + static inline wchar_t *UniStrncat(wchar_t *ucs1, const wchar_t *ucs2, size_t n) 152 + { 153 + wchar_t *anchor = ucs1; /* save pointer to string 1 */ 154 + 155 + while (*ucs1++) 156 + /*NULL*/; 157 + ucs1--; /* point to null terminator of s1 */ 158 + while (n-- && (*ucs1 = *ucs2)) { /* copy s2 after s1 */ 159 + ucs1++; 160 + ucs2++; 161 + } 162 + *ucs1 = 0; /* Null terminate the result */ 163 + return anchor; 164 + } 165 + 166 + /* 167 + * UniStrncmp: Compare length limited string 168 + */ 169 + static inline int UniStrncmp(const wchar_t *ucs1, const wchar_t *ucs2, size_t n) 170 + { 171 + if (!n) 172 + return 0; /* Null strings are equal */ 173 + while ((*ucs1 == *ucs2) && *ucs1 && --n) { 174 + ucs1++; 175 + ucs2++; 176 + } 177 + return (int)*ucs1 - (int)*ucs2; 178 + } 179 + 180 + /* 181 + * UniStrncmp_le: Compare length limited string - native to little-endian 182 + */ 183 + static inline int 184 + UniStrncmp_le(const wchar_t *ucs1, const wchar_t *ucs2, size_t n) 185 + { 186 + if (!n) 187 + return 0; /* Null strings are equal */ 188 + while ((*ucs1 == __le16_to_cpu(*ucs2)) && *ucs1 && --n) { 189 + ucs1++; 190 + ucs2++; 191 + } 192 + return (int)*ucs1 - (int)__le16_to_cpu(*ucs2); 193 + } 194 + 195 + /* 196 + * UniStrncpy: Copy length limited string with pad 197 + */ 198 + static inline wchar_t *UniStrncpy(wchar_t *ucs1, const wchar_t *ucs2, size_t n) 199 + { 200 + wchar_t *anchor = ucs1; 201 + 202 + while (n-- && *ucs2) /* Copy the strings */ 203 + *ucs1++ = *ucs2++; 204 + 205 + n++; 206 + while (n--) /* Pad with nulls */ 207 + *ucs1++ = 0; 208 + return anchor; 209 + } 210 + 211 + /* 212 + * UniStrncpy_le: Copy length limited string with pad to little-endian 213 + */ 214 + static inline wchar_t *UniStrncpy_le(wchar_t *ucs1, const wchar_t *ucs2, size_t n) 215 + { 216 + wchar_t *anchor = ucs1; 217 + 218 + while (n-- && *ucs2) /* Copy the strings */ 219 + *ucs1++ = __le16_to_cpu(*ucs2++); 220 + 221 + n++; 222 + while (n--) /* Pad with nulls */ 223 + *ucs1++ = 0; 224 + return anchor; 225 + } 226 + 227 + /* 228 + * UniStrstr: Find a string in a string 229 + * 230 + * Returns: 231 + * Address of first match found 232 + * NULL if no matching string is found 233 + */ 234 + static inline wchar_t *UniStrstr(const wchar_t *ucs1, const wchar_t *ucs2) 235 + { 236 + const wchar_t *anchor1 = ucs1; 237 + const wchar_t *anchor2 = ucs2; 238 + 239 + while (*ucs1) { 240 + if (*ucs1 == *ucs2) { 241 + /* Partial match found */ 242 + ucs1++; 243 + ucs2++; 244 + } else { 245 + if (!*ucs2) /* Match found */ 246 + return (wchar_t *)anchor1; 247 + ucs1 = ++anchor1; /* No match */ 248 + ucs2 = anchor2; 249 + } 250 + } 251 + 252 + if (!*ucs2) /* Both end together */ 253 + return (wchar_t *)anchor1; /* Match found */ 254 + return NULL; /* No match */ 255 + } 256 + 257 + #ifndef UNIUPR_NOUPPER 258 + /* 259 + * UniToupper: Convert a unicode character to upper case 260 + */ 261 + static inline wchar_t UniToupper(register wchar_t uc) 262 + { 263 + register const struct UniCaseRange *rp; 264 + 265 + if (uc < sizeof(NlsUniUpperTable)) { 266 + /* Latin characters */ 267 + return uc + NlsUniUpperTable[uc]; /* Use base tables */ 268 + } 269 + 270 + rp = NlsUniUpperRange; /* Use range tables */ 271 + while (rp->start) { 272 + if (uc < rp->start) /* Before start of range */ 273 + return uc; /* Uppercase = input */ 274 + if (uc <= rp->end) /* In range */ 275 + return uc + rp->table[uc - rp->start]; 276 + rp++; /* Try next range */ 277 + } 278 + return uc; /* Past last range */ 279 + } 280 + 281 + /* 282 + * UniStrupr: Upper case a unicode string 283 + */ 284 + static inline __le16 *UniStrupr(register __le16 *upin) 285 + { 286 + register __le16 *up; 287 + 288 + up = upin; 289 + while (*up) { /* For all characters */ 290 + *up = cpu_to_le16(UniToupper(le16_to_cpu(*up))); 291 + up++; 292 + } 293 + return upin; /* Return input pointer */ 294 + } 295 + #endif /* UNIUPR_NOUPPER */ 296 + 297 + #endif /* _NLS_UCS2_UTILS_H */
+1
fs/smb/server/Kconfig
··· 5 5 depends on FILE_LOCKING 6 6 select NLS 7 7 select NLS_UTF8 8 + select NLS_UCS2_UTILS 8 9 select CRYPTO 9 10 select CRYPTO_MD5 10 11 select CRYPTO_HMAC
-1
fs/smb/server/unicode.c
··· 11 11 #include <asm/unaligned.h> 12 12 #include "glob.h" 13 13 #include "unicode.h" 14 - #include "uniupr.h" 15 14 #include "smb_common.h" 16 15 17 16 /*
+4 -273
fs/smb/server/unicode.h
··· 18 18 * This is a compressed table of upper and lower case conversion. 19 19 * 20 20 */ 21 - #ifndef _CIFS_UNICODE_H 22 - #define _CIFS_UNICODE_H 21 + #ifndef _SMB_UNICODE_H 22 + #define _SMB_UNICODE_H 23 23 24 24 #include <asm/byteorder.h> 25 25 #include <linux/types.h> 26 26 #include <linux/nls.h> 27 27 #include <linux/unicode.h> 28 - 29 - /* 30 - * Windows maps these to the user defined 16 bit Unicode range since they are 31 - * reserved symbols (along with \ and /), otherwise illegal to store 32 - * in filenames in NTFS 33 - */ 34 - #define UNI_ASTERISK ((__u16)('*' + 0xF000)) 35 - #define UNI_QUESTION ((__u16)('?' + 0xF000)) 36 - #define UNI_COLON ((__u16)(':' + 0xF000)) 37 - #define UNI_GRTRTHAN ((__u16)('>' + 0xF000)) 38 - #define UNI_LESSTHAN ((__u16)('<' + 0xF000)) 39 - #define UNI_PIPE ((__u16)('|' + 0xF000)) 40 - #define UNI_SLASH ((__u16)('\\' + 0xF000)) 41 - 42 - /* Just define what we want from uniupr.h. We don't want to define the tables 43 - * in each source file. 44 - */ 45 - #ifndef UNICASERANGE_DEFINED 46 - struct UniCaseRange { 47 - wchar_t start; 48 - wchar_t end; 49 - signed char *table; 50 - }; 51 - #endif /* UNICASERANGE_DEFINED */ 52 - 53 - #ifndef UNIUPR_NOUPPER 54 - extern signed char SmbUniUpperTable[512]; 55 - extern const struct UniCaseRange SmbUniUpperRange[]; 56 - #endif /* UNIUPR_NOUPPER */ 28 + #include "../../nls/nls_ucs2_utils.h" 57 29 58 30 #ifdef __KERNEL__ 59 31 int smb_strtoUTF16(__le16 *to, const char *from, int len, ··· 38 66 char *ksmbd_extract_sharename(struct unicode_map *um, const char *treename); 39 67 #endif 40 68 41 - /* 42 - * UniStrcat: Concatenate the second string to the first 43 - * 44 - * Returns: 45 - * Address of the first string 46 - */ 47 - static inline wchar_t *UniStrcat(wchar_t *ucs1, const wchar_t *ucs2) 48 - { 49 - wchar_t *anchor = ucs1; /* save a pointer to start of ucs1 */ 50 - 51 - while (*ucs1++) 52 - /*NULL*/; /* To end of first string */ 53 - ucs1--; /* Return to the null */ 54 - while ((*ucs1++ = *ucs2++)) 55 - /*NULL*/; /* copy string 2 over */ 56 - return anchor; 57 - } 58 - 59 - /* 60 - * UniStrchr: Find a character in a string 61 - * 62 - * Returns: 63 - * Address of first occurrence of character in string 64 - * or NULL if the character is not in the string 65 - */ 66 - static inline wchar_t *UniStrchr(const wchar_t *ucs, wchar_t uc) 67 - { 68 - while ((*ucs != uc) && *ucs) 69 - ucs++; 70 - 71 - if (*ucs == uc) 72 - return (wchar_t *)ucs; 73 - return NULL; 74 - } 75 - 76 - /* 77 - * UniStrcmp: Compare two strings 78 - * 79 - * Returns: 80 - * < 0: First string is less than second 81 - * = 0: Strings are equal 82 - * > 0: First string is greater than second 83 - */ 84 - static inline int UniStrcmp(const wchar_t *ucs1, const wchar_t *ucs2) 85 - { 86 - while ((*ucs1 == *ucs2) && *ucs1) { 87 - ucs1++; 88 - ucs2++; 89 - } 90 - return (int)*ucs1 - (int)*ucs2; 91 - } 92 - 93 - /* 94 - * UniStrcpy: Copy a string 95 - */ 96 - static inline wchar_t *UniStrcpy(wchar_t *ucs1, const wchar_t *ucs2) 97 - { 98 - wchar_t *anchor = ucs1; /* save the start of result string */ 99 - 100 - while ((*ucs1++ = *ucs2++)) 101 - /*NULL*/; 102 - return anchor; 103 - } 104 - 105 - /* 106 - * UniStrlen: Return the length of a string (in 16 bit Unicode chars not bytes) 107 - */ 108 - static inline size_t UniStrlen(const wchar_t *ucs1) 109 - { 110 - int i = 0; 111 - 112 - while (*ucs1++) 113 - i++; 114 - return i; 115 - } 116 - 117 - /* 118 - * UniStrnlen: Return the length (in 16 bit Unicode chars not bytes) of a 119 - * string (length limited) 120 - */ 121 - static inline size_t UniStrnlen(const wchar_t *ucs1, int maxlen) 122 - { 123 - int i = 0; 124 - 125 - while (*ucs1++) { 126 - i++; 127 - if (i >= maxlen) 128 - break; 129 - } 130 - return i; 131 - } 132 - 133 - /* 134 - * UniStrncat: Concatenate length limited string 135 - */ 136 - static inline wchar_t *UniStrncat(wchar_t *ucs1, const wchar_t *ucs2, size_t n) 137 - { 138 - wchar_t *anchor = ucs1; /* save pointer to string 1 */ 139 - 140 - while (*ucs1++) 141 - /*NULL*/; 142 - ucs1--; /* point to null terminator of s1 */ 143 - while (n-- && (*ucs1 = *ucs2)) { /* copy s2 after s1 */ 144 - ucs1++; 145 - ucs2++; 146 - } 147 - *ucs1 = 0; /* Null terminate the result */ 148 - return anchor; 149 - } 150 - 151 - /* 152 - * UniStrncmp: Compare length limited string 153 - */ 154 - static inline int UniStrncmp(const wchar_t *ucs1, const wchar_t *ucs2, size_t n) 155 - { 156 - if (!n) 157 - return 0; /* Null strings are equal */ 158 - while ((*ucs1 == *ucs2) && *ucs1 && --n) { 159 - ucs1++; 160 - ucs2++; 161 - } 162 - return (int)*ucs1 - (int)*ucs2; 163 - } 164 - 165 - /* 166 - * UniStrncmp_le: Compare length limited string - native to little-endian 167 - */ 168 - static inline int 169 - UniStrncmp_le(const wchar_t *ucs1, const wchar_t *ucs2, size_t n) 170 - { 171 - if (!n) 172 - return 0; /* Null strings are equal */ 173 - while ((*ucs1 == __le16_to_cpu(*ucs2)) && *ucs1 && --n) { 174 - ucs1++; 175 - ucs2++; 176 - } 177 - return (int)*ucs1 - (int)__le16_to_cpu(*ucs2); 178 - } 179 - 180 - /* 181 - * UniStrncpy: Copy length limited string with pad 182 - */ 183 - static inline wchar_t *UniStrncpy(wchar_t *ucs1, const wchar_t *ucs2, size_t n) 184 - { 185 - wchar_t *anchor = ucs1; 186 - 187 - while (n-- && *ucs2) /* Copy the strings */ 188 - *ucs1++ = *ucs2++; 189 - 190 - n++; 191 - while (n--) /* Pad with nulls */ 192 - *ucs1++ = 0; 193 - return anchor; 194 - } 195 - 196 - /* 197 - * UniStrncpy_le: Copy length limited string with pad to little-endian 198 - */ 199 - static inline wchar_t *UniStrncpy_le(wchar_t *ucs1, const wchar_t *ucs2, size_t n) 200 - { 201 - wchar_t *anchor = ucs1; 202 - 203 - while (n-- && *ucs2) /* Copy the strings */ 204 - *ucs1++ = __le16_to_cpu(*ucs2++); 205 - 206 - n++; 207 - while (n--) /* Pad with nulls */ 208 - *ucs1++ = 0; 209 - return anchor; 210 - } 211 - 212 - /* 213 - * UniStrstr: Find a string in a string 214 - * 215 - * Returns: 216 - * Address of first match found 217 - * NULL if no matching string is found 218 - */ 219 - static inline wchar_t *UniStrstr(const wchar_t *ucs1, const wchar_t *ucs2) 220 - { 221 - const wchar_t *anchor1 = ucs1; 222 - const wchar_t *anchor2 = ucs2; 223 - 224 - while (*ucs1) { 225 - if (*ucs1 == *ucs2) { 226 - /* Partial match found */ 227 - ucs1++; 228 - ucs2++; 229 - } else { 230 - if (!*ucs2) /* Match found */ 231 - return (wchar_t *)anchor1; 232 - ucs1 = ++anchor1; /* No match */ 233 - ucs2 = anchor2; 234 - } 235 - } 236 - 237 - if (!*ucs2) /* Both end together */ 238 - return (wchar_t *)anchor1; /* Match found */ 239 - return NULL; /* No match */ 240 - } 241 - 242 - #ifndef UNIUPR_NOUPPER 243 - /* 244 - * UniToupper: Convert a unicode character to upper case 245 - */ 246 - static inline wchar_t UniToupper(register wchar_t uc) 247 - { 248 - register const struct UniCaseRange *rp; 249 - 250 - if (uc < sizeof(SmbUniUpperTable)) { 251 - /* Latin characters */ 252 - return uc + SmbUniUpperTable[uc]; /* Use base tables */ 253 - } 254 - 255 - rp = SmbUniUpperRange; /* Use range tables */ 256 - while (rp->start) { 257 - if (uc < rp->start) /* Before start of range */ 258 - return uc; /* Uppercase = input */ 259 - if (uc <= rp->end) /* In range */ 260 - return uc + rp->table[uc - rp->start]; 261 - rp++; /* Try next range */ 262 - } 263 - return uc; /* Past last range */ 264 - } 265 - 266 - /* 267 - * UniStrupr: Upper case a unicode string 268 - */ 269 - static inline __le16 *UniStrupr(register __le16 *upin) 270 - { 271 - register __le16 *up; 272 - 273 - up = upin; 274 - while (*up) { /* For all characters */ 275 - *up = cpu_to_le16(UniToupper(le16_to_cpu(*up))); 276 - up++; 277 - } 278 - return upin; /* Return input pointer */ 279 - } 280 - #endif /* UNIUPR_NOUPPER */ 281 - 282 - #endif /* _CIFS_UNICODE_H */ 69 + #endif /* _SMB_UNICODE_H */
+17 -10
fs/smb/server/uniupr.h fs/nls/nls_ucs2_utils.c
··· 1 - /* SPDX-License-Identifier: GPL-2.0-or-later */ 1 + // SPDX-License-Identifier: GPL-2.0-or-later 2 2 /* 3 3 * Some of the source code in this file came from fs/cifs/uniupr.h 4 4 * Copyright (c) International Business Machines Corp., 2000,2002 5 5 * 6 - * uniupr.h - Unicode compressed case ranges 6 + * Some of the source code in this file came from fs/cifs/cifs_unicode.c 7 + * 8 + * Copyright (c) International Business Machines Corp., 2000,2009 9 + * Modified by Steve French (sfrench@us.ibm.com) 10 + * Modified by Namjae Jeon (linkinjeon@kernel.org) 7 11 * 8 12 */ 9 - #ifndef __KSMBD_UNIUPR_H 10 - #define __KSMBD_UNIUPR_H 13 + #include <linux/fs.h> 14 + #include <linux/module.h> 15 + #include <linux/slab.h> 16 + #include <asm/unaligned.h> 17 + #include "nls_ucs2_utils.h" 11 18 12 - #ifndef UNIUPR_NOUPPER 19 + MODULE_LICENSE("GPL"); 20 + 13 21 /* 14 22 * Latin upper case 15 23 */ 16 - signed char SmbUniUpperTable[512] = { 24 + signed char NlsUniUpperTable[512] = { 17 25 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 000-00f */ 18 26 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 010-01f */ 19 27 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 020-02f */ ··· 59 51 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, /* 1e0-1ef */ 60 52 0, 0, -1, -2, 0, -1, 0, 0, 0, -1, 0, -1, 0, -1, 0, -1, /* 1f0-1ff */ 61 53 }; 54 + EXPORT_SYMBOL_GPL(NlsUniUpperTable); 62 55 63 56 /* Upper case range - Greek */ 64 57 static signed char UniCaseRangeU03a0[47] = { ··· 135 126 /* 136 127 * Upper Case Range 137 128 */ 138 - const struct UniCaseRange SmbUniUpperRange[] = { 129 + const struct UniCaseRange NlsUniUpperRange[] = { 139 130 {0x03a0, 0x03ce, UniCaseRangeU03a0}, 140 131 {0x0430, 0x045f, UniCaseRangeU0430}, 141 132 {0x0490, 0x04cc, UniCaseRangeU0490}, ··· 143 134 {0xff40, 0xff5a, UniCaseRangeUff40}, 144 135 {0} 145 136 }; 146 - #endif 147 - 148 - #endif /* __KSMBD_UNIUPR_H */ 137 + EXPORT_SYMBOL_GPL(NlsUniUpperRange);