From 0c9de0c356585569d71f31c3b1a785d39f47e9b2 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 5 Jan 2009 13:57:26 -0800 Subject: [PATCH] Linux kernel modularize unicode --- module/unicode/u8_textprep.c | 23 +++++++++++++++++++++++ module/unicode/uconv.c | 9 +++++++++ 2 files changed, 32 insertions(+) diff --git a/module/unicode/u8_textprep.c b/module/unicode/u8_textprep.c index 8faf1a97e4..72299b51f3 100644 --- a/module/unicode/u8_textprep.c +++ b/module/unicode/u8_textprep.c @@ -2130,3 +2130,26 @@ u8_textprep_str(char *inarray, size_t *inlen, char *outarray, size_t *outlen, return (ret_val); } + +#if defined(_KERNEL) && defined(HAVE_SPL) +static int __init unicode_init(void) +{ + return 0; +} + +static void unicode_fini(void) +{ + return; +} + +module_init(unicode_init); +module_exit(unicode_fini); + +MODULE_AUTHOR("Sun Microsystems, Inc"); +MODULE_DESCRIPTION("Unicode implementation"); +MODULE_LICENSE("CDDL"); + +EXPORT_SYMBOL(u8_validate); +EXPORT_SYMBOL(u8_strcmp); +EXPORT_SYMBOL(u8_textprep_str); +#endif diff --git a/module/unicode/uconv.c b/module/unicode/uconv.c index fd65fc99b5..a9fa9cf33a 100644 --- a/module/unicode/uconv.c +++ b/module/unicode/uconv.c @@ -853,3 +853,12 @@ uconv_u8tou32(const uchar_t *u8s, size_t *utf8len, return (0); } + +#if defined(_KERNEL) && defined(HAVE_SPL) +EXPORT_SYMBOL(uconv_u16tou32); +EXPORT_SYMBOL(uconv_u16tou8); +EXPORT_SYMBOL(uconv_u32tou16); +EXPORT_SYMBOL(uconv_u32tou8); +EXPORT_SYMBOL(uconv_u8tou16); +EXPORT_SYMBOL(uconv_u8tou32); +#endif