mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2024-12-28 16:53:49 +00:00
unicode updates
This update includes: - A patch by Thomas Weißschuh constifying a read-only struct. - A patch by André Almeida fixing the error path of unicode_load, which might trigger a kernel oops if it fails to find the unicode module. - One documentation fix by Gan Jie, updating a filename in the README. - A patch by André Almeida adding the link of my tree to MAINTAINERS. All but the MAINTAINERS patch have been sitting on my tree and in linux-next since early in the 6.12 cycle. Signed-off-by: Gabriel Krisman Bertazi <krisman@suse.de> -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQS3XO7QfvpFoONBhH1OwQgI3t8RJgUCZ0D4JwAKCRBOwQgI3t8R JmjZAP988O9eB4ITF6KHKsHyY3pOhxSRXU5jpr78v7ofDDuGwAD/UBJZyF35wgJz S2q295kCAEP8bUKxj6RJtyMyQnamQg8= =irw2 -----END PGP SIGNATURE----- Merge tag 'unicode-next-6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/krisman/unicode Pull unicode updates from Gabriel Krisman Bertazi: - constify a read-only struct (Thomas Weißschuh) - fix the error path of unicode_load, avoiding a possible kernel oops if it fails to find the unicode module (André Almeida) - documentation fix, updating a filename in the README (Gan Jie) - add the link of my tree to MAINTAINERS (André Almeida) * tag 'unicode-next-6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/krisman/unicode: MAINTAINERS: Add Unicode tree unicode: change the reference of database file unicode: Fix utf8_load() error path unicode: constify utf8 data table
This commit is contained in:
commit
060fc106b6
@ -23925,6 +23925,7 @@ UNICODE SUBSYSTEM
|
||||
M: Gabriel Krisman Bertazi <krisman@kernel.org>
|
||||
L: linux-fsdevel@vger.kernel.org
|
||||
S: Supported
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/krisman/unicode.git
|
||||
F: fs/unicode/
|
||||
|
||||
UNIFDEF
|
||||
|
@ -1,4 +1,4 @@
|
||||
The utf8data.h file in this directory is generated from the Unicode
|
||||
The utf8data.c file in this directory is generated from the Unicode
|
||||
Character Database for version 12.1.0 of the Unicode standard.
|
||||
|
||||
The full set of files can be found here:
|
||||
@ -45,13 +45,13 @@ Then, build under fs/unicode/ with REGENERATE_UTF8DATA=1:
|
||||
|
||||
make REGENERATE_UTF8DATA=1 fs/unicode/
|
||||
|
||||
After sanity checking the newly generated utf8data.h file (the
|
||||
After sanity checking the newly generated utf8data.c file (the
|
||||
version generated from the 12.1.0 UCD should be 4,109 lines long, and
|
||||
have a total size of 324k) and/or comparing it with the older version
|
||||
of utf8data.h_shipped, rename it to utf8data.h_shipped.
|
||||
of utf8data.c_shipped, rename it to utf8data.c_shipped.
|
||||
|
||||
If you are a kernel developer updating to a newer version of the
|
||||
Unicode Character Database, please update this README.utf8data file
|
||||
with the version of the UCD that was used, the md5sum and sha1sums of
|
||||
the *.txt files, before checking in the new versions of the utf8data.h
|
||||
the *.txt files, before checking in the new versions of the utf8data.c
|
||||
and README.utf8data files.
|
||||
|
@ -36,7 +36,7 @@
|
||||
#define FOLD_NAME "CaseFolding.txt"
|
||||
#define NORM_NAME "NormalizationCorrections.txt"
|
||||
#define TEST_NAME "NormalizationTest.txt"
|
||||
#define UTF8_NAME "utf8data.h"
|
||||
#define UTF8_NAME "utf8data.c"
|
||||
|
||||
const char *age_name = AGE_NAME;
|
||||
const char *ccc_name = CCC_NAME;
|
||||
@ -3269,7 +3269,7 @@ static void write_file(void)
|
||||
}
|
||||
fprintf(file, "};\n");
|
||||
fprintf(file, "\n");
|
||||
fprintf(file, "struct utf8data_table utf8_data_table = {\n");
|
||||
fprintf(file, "const struct utf8data_table utf8_data_table = {\n");
|
||||
fprintf(file, "\t.utf8agetab = utf8agetab,\n");
|
||||
fprintf(file, "\t.utf8agetab_size = ARRAY_SIZE(utf8agetab),\n");
|
||||
fprintf(file, "\n");
|
||||
|
@ -198,7 +198,7 @@ struct unicode_map *utf8_load(unsigned int version)
|
||||
return um;
|
||||
|
||||
out_symbol_put:
|
||||
symbol_put(um->tables);
|
||||
symbol_put(utf8_data_table);
|
||||
out_free_um:
|
||||
kfree(um);
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
@ -4096,7 +4096,7 @@ static const unsigned char utf8data[64080] = {
|
||||
0x80,0xcf,0x86,0x85,0x84,0xcf,0x86,0xcf,0x06,0x02,0x00,0x00,0x00,0x00,0x00,0x00
|
||||
};
|
||||
|
||||
struct utf8data_table utf8_data_table = {
|
||||
const struct utf8data_table utf8_data_table = {
|
||||
.utf8agetab = utf8agetab,
|
||||
.utf8agetab_size = ARRAY_SIZE(utf8agetab),
|
||||
|
||||
|
@ -78,6 +78,6 @@ struct utf8data_table {
|
||||
const unsigned char *utf8data;
|
||||
};
|
||||
|
||||
extern struct utf8data_table utf8_data_table;
|
||||
extern const struct utf8data_table utf8_data_table;
|
||||
|
||||
#endif /* UTF8NORM_H */
|
||||
|
Loading…
Reference in New Issue
Block a user