diff options
author | Dr. David Alan Gilbert <linux@treblig.org> | 2023-08-17 01:22:32 +0100 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2023-08-30 08:55:52 -0500 |
commit | f3a9b3758e0b6d40183929aba599a7da52313a3e (patch) | |
tree | 717cc6b9aca9a216be36c4a62d5399d2de9e137f /fs/nls | |
parent | de54845290cee3f65dcd03b35a2bd7f2f7aed2ac (diff) |
fs/jfs: Use common ucs2 upper case table
Use the UCS-2 upper case tables from nls, that are shared
with smb.
This code in JFS is hard to test, so we're only reusing the
same tables (which are identical), not trying to reuse the
rest of the helper functions.
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>
Diffstat (limited to 'fs/nls')
-rw-r--r-- | fs/nls/nls_ucs2_data.h | 15 | ||||
-rw-r--r-- | fs/nls/nls_ucs2_utils.h | 14 |
2 files changed, 16 insertions, 13 deletions
diff --git a/fs/nls/nls_ucs2_data.h b/fs/nls/nls_ucs2_data.h new file mode 100644 index 000000000000..1f454dc0f4e0 --- /dev/null +++ b/fs/nls/nls_ucs2_data.h @@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#ifndef _NLS_UCS2_DATA_H +#define _NLS_UCS2_DATA_H + +struct UniCaseRange { + wchar_t start; + wchar_t end; + signed char *table; +}; + +extern signed char NlsUniUpperTable[512]; +extern const struct UniCaseRange NlsUniUpperRange[]; + +#endif /* _NLS_UCS2_DATA_H */ diff --git a/fs/nls/nls_ucs2_utils.h b/fs/nls/nls_ucs2_utils.h index 3500596ea993..ef18d30db1d0 100644 --- a/fs/nls/nls_ucs2_utils.h +++ b/fs/nls/nls_ucs2_utils.h @@ -26,6 +26,7 @@ #include <linux/types.h> #include <linux/nls.h> #include <linux/unicode.h> +#include "nls_ucs2_data.h" /* * Windows maps these to the user defined 16 bit Unicode range since they are @@ -40,19 +41,6 @@ #define UNI_PIPE ((__u16)('|' + 0xF000)) #define UNI_SLASH ((__u16)('\\' + 0xF000)) -#ifndef UNICASERANGE_DEFINED -struct UniCaseRange { - wchar_t start; - wchar_t end; - signed char *table; -}; -#endif /* UNICASERANGE_DEFINED */ - -#ifndef UNIUPR_NOUPPER -extern signed char NlsUniUpperTable[512]; -extern const struct UniCaseRange NlsUniUpperRange[]; -#endif /* UNIUPR_NOUPPER */ - /* * UniStrcat: Concatenate the second string to the first * |