* [PATCH] NLS as module
@ 2003-10-23 21:36 Guennadi Liakhovetski
2003-10-25 10:53 ` OGAWA Hirofumi
0 siblings, 1 reply; 6+ messages in thread
From: Guennadi Liakhovetski @ 2003-10-23 21:36 UTC (permalink / raw)
To: linux-kernel
Hello
Problem: NLS support can only be compiled in the kernel - and not as a
module. And if you don't configure one of Joliet / FAT and some other
filesystems at kernel compile-time, you can't compile these filesystems
later as modules(*). However, I see nothing that would prevent one from
compiling nls_base as a module. I tried - it worked, but I didn't actually
use any of the codepages. Just tried insmod nls_base, insmod <fs>, mount.
So, is it desired / really this trivial or are there some real reasons why
nls_base cannot be properly done as a module? I am attaching a naive
patch - but not really understanding NLS internals and not being able to
extensively test it, it might be not quite correct.
(*) This question has come up before - whether or not it is desirable to
be able to add modules to an existing kernel in the IPV6 context, IIRC.
Thanks
Guennadi
---
Guennadi Liakhovetski
diff -u linux-2.4.19-rmk7-tux1/fs/nls/Config.in linux-2.4.19-rmk7-tux1-rthal/fs/nls/Config.in
--- linux-2.4.19-rmk7-tux1/fs/nls/Config.in Tue May 21 22:18:00 2002
+++ linux-2.4.19-rmk7-tux1-rthal/fs/nls/Config.in Thu Oct 23 23:21:04 2003
@@ -10,54 +10,54 @@
fi
# msdos and Joliet want NLS
-if [ "$CONFIG_JOLIET" = "y" -o "$CONFIG_FAT_FS" != "n" \
- -o "$CONFIG_NTFS_FS" != "n" -o "$CONFIG_NCPFS_NLS" = "y" \
+if [ "$CONFIG_JOLIET" = "y" -o "$CONFIG_FAT_FS" = "y" \
+ -o "$CONFIG_NTFS_FS" = "y" -o "$CONFIG_NCPFS_NLS" = "y" \
-o "$CONFIG_SMB_NLS" = "y" ]; then
define_bool CONFIG_NLS y
else
- define_bool CONFIG_NLS n
+ tristate 'Base NLS support' CONFIG_NLS
fi
-if [ "$CONFIG_NLS" = "y" ]; then
+if [ "$CONFIG_NLS" != "n" ]; then
mainmenu_option next_comment
comment 'Native Language Support'
string 'Default NLS Option' CONFIG_NLS_DEFAULT "iso8859-1"
- tristate 'Codepage 437 (United States, Canada)' CONFIG_NLS_CODEPAGE_437
- tristate 'Codepage 737 (Greek)' CONFIG_NLS_CODEPAGE_737
- tristate 'Codepage 775 (Baltic Rim)' CONFIG_NLS_CODEPAGE_775
- tristate 'Codepage 850 (Europe)' CONFIG_NLS_CODEPAGE_850
- tristate 'Codepage 852 (Central/Eastern Europe)' CONFIG_NLS_CODEPAGE_852
- tristate 'Codepage 855 (Cyrillic)' CONFIG_NLS_CODEPAGE_855
- tristate 'Codepage 857 (Turkish)' CONFIG_NLS_CODEPAGE_857
- tristate 'Codepage 860 (Portuguese)' CONFIG_NLS_CODEPAGE_860
- tristate 'Codepage 861 (Icelandic)' CONFIG_NLS_CODEPAGE_861
- tristate 'Codepage 862 (Hebrew)' CONFIG_NLS_CODEPAGE_862
- tristate 'Codepage 863 (Canadian French)' CONFIG_NLS_CODEPAGE_863
- tristate 'Codepage 864 (Arabic)' CONFIG_NLS_CODEPAGE_864
- tristate 'Codepage 865 (Norwegian, Danish)' CONFIG_NLS_CODEPAGE_865
- tristate 'Codepage 866 (Cyrillic/Russian)' CONFIG_NLS_CODEPAGE_866
- tristate 'Codepage 869 (Greek)' CONFIG_NLS_CODEPAGE_869
- tristate 'Simplified Chinese charset (CP936, GB2312)' CONFIG_NLS_CODEPAGE_936
- tristate 'Traditional Chinese charset (Big5)' CONFIG_NLS_CODEPAGE_950
- tristate 'Japanese charsets (Shift-JIS, EUC-JP)' CONFIG_NLS_CODEPAGE_932
- tristate 'Korean charset (CP949, EUC-KR)' CONFIG_NLS_CODEPAGE_949
- tristate 'Thai charset (CP874, TIS-620)' CONFIG_NLS_CODEPAGE_874
- tristate 'Hebrew charsets (ISO-8859-8, CP1255)' CONFIG_NLS_ISO8859_8
- tristate 'Windows CP1250 (Slavic/Central European Languages)' CONFIG_NLS_CODEPAGE_1250
- tristate 'Windows CP1251 (Bulgarian, Belarusian)' CONFIG_NLS_CODEPAGE_1251
- tristate 'NLS ISO 8859-1 (Latin 1; Western European Languages)' CONFIG_NLS_ISO8859_1
- tristate 'NLS ISO 8859-2 (Latin 2; Slavic/Central European Languages)' CONFIG_NLS_ISO8859_2
- tristate 'NLS ISO 8859-3 (Latin 3; Esperanto, Galician, Maltese, Turkish)' CONFIG_NLS_ISO8859_3
- tristate 'NLS ISO 8859-4 (Latin 4; old Baltic charset)' CONFIG_NLS_ISO8859_4
- tristate 'NLS ISO 8859-5 (Cyrillic)' CONFIG_NLS_ISO8859_5
- tristate 'NLS ISO 8859-6 (Arabic)' CONFIG_NLS_ISO8859_6
- tristate 'NLS ISO 8859-7 (Modern Greek)' CONFIG_NLS_ISO8859_7
- tristate 'NLS ISO 8859-9 (Latin 5; Turkish)' CONFIG_NLS_ISO8859_9
- tristate 'NLS ISO 8859-13 (Latin 7; Baltic)' CONFIG_NLS_ISO8859_13
- tristate 'NLS ISO 8859-14 (Latin 8; Celtic)' CONFIG_NLS_ISO8859_14
- tristate 'NLS ISO 8859-15 (Latin 9; Western European Languages with Euro)' CONFIG_NLS_ISO8859_15
- tristate 'NLS KOI8-R (Russian)' CONFIG_NLS_KOI8_R
- tristate 'NLS KOI8-U/RU (Ukrainian, Belarusian)' CONFIG_NLS_KOI8_U
- tristate 'NLS UTF8' CONFIG_NLS_UTF8
+ dep_tristate 'Codepage 437 (United States, Canada)' CONFIG_NLS_CODEPAGE_437 $CONFIG_NLS
+ dep_tristate 'Codepage 737 (Greek)' CONFIG_NLS_CODEPAGE_737 $CONFIG_NLS
+ dep_tristate 'Codepage 775 (Baltic Rim)' CONFIG_NLS_CODEPAGE_775 $CONFIG_NLS
+ dep_tristate 'Codepage 850 (Europe)' CONFIG_NLS_CODEPAGE_850 $CONFIG_NLS
+ dep_tristate 'Codepage 852 (Central/Eastern Europe)' CONFIG_NLS_CODEPAGE_852 $CONFIG_NLS
+ dep_tristate 'Codepage 855 (Cyrillic)' CONFIG_NLS_CODEPAGE_855 $CONFIG_NLS
+ dep_tristate 'Codepage 857 (Turkish)' CONFIG_NLS_CODEPAGE_857 $CONFIG_NLS
+ dep_tristate 'Codepage 860 (Portuguese)' CONFIG_NLS_CODEPAGE_860 $CONFIG_NLS
+ dep_tristate 'Codepage 861 (Icelandic)' CONFIG_NLS_CODEPAGE_861 $CONFIG_NLS
+ dep_tristate 'Codepage 862 (Hebrew)' CONFIG_NLS_CODEPAGE_862 $CONFIG_NLS
+ dep_tristate 'Codepage 863 (Canadian French)' CONFIG_NLS_CODEPAGE_863 $CONFIG_NLS
+ dep_tristate 'Codepage 864 (Arabic)' CONFIG_NLS_CODEPAGE_864 $CONFIG_NLS
+ dep_tristate 'Codepage 865 (Norwegian, Danish)' CONFIG_NLS_CODEPAGE_865 $CONFIG_NLS
+ dep_tristate 'Codepage 866 (Cyrillic/Russian)' CONFIG_NLS_CODEPAGE_866 $CONFIG_NLS
+ dep_tristate 'Codepage 869 (Greek)' CONFIG_NLS_CODEPAGE_869 $CONFIG_NLS
+ dep_tristate 'Simplified Chinese charset (CP936, GB2312)' CONFIG_NLS_CODEPAGE_936 $CONFIG_NLS
+ dep_tristate 'Traditional Chinese charset (Big5)' CONFIG_NLS_CODEPAGE_950 $CONFIG_NLS
+ dep_tristate 'Japanese charsets (Shift-JIS, EUC-JP)' CONFIG_NLS_CODEPAGE_932 $CONFIG_NLS
+ dep_tristate 'Korean charset (CP949, EUC-KR)' CONFIG_NLS_CODEPAGE_949 $CONFIG_NLS
+ dep_tristate 'Thai charset (CP874, TIS-620)' CONFIG_NLS_CODEPAGE_874 $CONFIG_NLS
+ dep_tristate 'Hebrew charsets (ISO-8859-8, CP1255)' CONFIG_NLS_ISO8859_8 $CONFIG_NLS
+ dep_tristate 'Windows CP1250 (Slavic/Central European Languages)' CONFIG_NLS_CODEPAGE_1250 $CONFIG_NLS
+ dep_tristate 'Windows CP1251 (Bulgarian, Belarusian)' CONFIG_NLS_CODEPAGE_1251 $CONFIG_NLS
+ dep_tristate 'NLS ISO 8859-1 (Latin 1; Western European Languages)' CONFIG_NLS_ISO8859_1 $CONFIG_NLS
+ dep_tristate 'NLS ISO 8859-2 (Latin 2; Slavic/Central European Languages)' CONFIG_NLS_ISO8859_2 $CONFIG_NLS
+ dep_tristate 'NLS ISO 8859-3 (Latin 3; Esperanto, Galician, Maltese, Turkish)' CONFIG_NLS_ISO8859_3 $CONFIG_NLS
+ dep_tristate 'NLS ISO 8859-4 (Latin 4; old Baltic charset)' CONFIG_NLS_ISO8859_4 $CONFIG_NLS
+ dep_tristate 'NLS ISO 8859-5 (Cyrillic)' CONFIG_NLS_ISO8859_5 $CONFIG_NLS
+ dep_tristate 'NLS ISO 8859-6 (Arabic)' CONFIG_NLS_ISO8859_6 $CONFIG_NLS
+ dep_tristate 'NLS ISO 8859-7 (Modern Greek)' CONFIG_NLS_ISO8859_7 $CONFIG_NLS
+ dep_tristate 'NLS ISO 8859-9 (Latin 5; Turkish)' CONFIG_NLS_ISO8859_9 $CONFIG_NLS
+ dep_tristate 'NLS ISO 8859-13 (Latin 7; Baltic)' CONFIG_NLS_ISO8859_13 $CONFIG_NLS
+ dep_tristate 'NLS ISO 8859-14 (Latin 8; Celtic)' CONFIG_NLS_ISO8859_14 $CONFIG_NLS
+ dep_tristate 'NLS ISO 8859-15 (Latin 9; Western European Languages with Euro)' CONFIG_NLS_ISO8859_15 $CONFIG_NLS
+ dep_tristate 'NLS KOI8-R (Russian)' CONFIG_NLS_KOI8_R $CONFIG_NLS
+ dep_tristate 'NLS KOI8-U/RU (Ukrainian, Belarusian)' CONFIG_NLS_KOI8_U $CONFIG_NLS
+ dep_tristate 'NLS UTF8' CONFIG_NLS_UTF8 $CONFIG_NLS
endmenu
fi
diff -u linux-2.4.19-rmk7-tux1/fs/nls/Makefile linux-2.4.19-rmk7-tux1-rthal/fs/nls/Makefile
--- linux-2.4.19-rmk7-tux1/fs/nls/Makefile Mon Nov 26 00:12:17 2001
+++ linux-2.4.19-rmk7-tux1-rthal/fs/nls/Makefile Thu Oct 23 23:09:06 2003
@@ -2,10 +2,13 @@
# Makefile for native language support
#
-obj-y := nls_base.o
+nls_base := nls_base.o
+
+obj-y :=
obj-m :=
obj-n :=
obj- :=
+obj-$(CONFIG_NLS) := $(nls_base)
obj-$(CONFIG_NLS_CODEPAGE_437) += nls_cp437.o
obj-$(CONFIG_NLS_CODEPAGE_737) += nls_cp737.o
@@ -53,7 +56,7 @@
obj-$(CONFIG_NLS_ABC) += nls_abc.o
obj-$(CONFIG_NLS_UTF8) += nls_utf8.o
-export-objs = $(obj-y)
+export-objs = $(nls_base)
O_TARGET = nls.o
diff -u linux-2.4.19-rmk7-tux1/fs/nls/nls_base.c linux-2.4.19-rmk7-tux1-rthal/fs/nls/nls_base.c
--- linux-2.4.19-rmk7-tux1/fs/nls/nls_base.c Wed Nov 27 22:47:04 2002
+++ linux-2.4.19-rmk7-tux1-rthal/fs/nls/nls_base.c Thu Oct 23 22:04:49 2003
@@ -10,6 +10,7 @@
#include <linux/version.h>
#include <linux/module.h>
+#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/config.h>
#include <linux/nls.h>
@@ -489,6 +490,18 @@
else
return &default_table;
}
+
+static int __init init_nls_base(void)
+{
+ return 0;
+}
+
+static void __exit exit_nls_base(void)
+{
+}
+
+module_init(init_nls_base)
+module_exit(exit_nls_base)
EXPORT_SYMBOL(register_nls);
EXPORT_SYMBOL(unregister_nls);
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] NLS as module 2003-10-23 21:36 [PATCH] NLS as module Guennadi Liakhovetski @ 2003-10-25 10:53 ` OGAWA Hirofumi 2003-10-25 22:55 ` Guennadi Liakhovetski 0 siblings, 1 reply; 6+ messages in thread From: OGAWA Hirofumi @ 2003-10-25 10:53 UTC (permalink / raw) To: Guennadi Liakhovetski; +Cc: linux-kernel Guennadi Liakhovetski <g.liakhovetski@gmx.de> writes: > Problem: NLS support can only be compiled in the kernel - and not as a > module. And if you don't configure one of Joliet / FAT and some other > filesystems at kernel compile-time, you can't compile these filesystems > later as modules(*). However, I see nothing that would prevent one from > compiling nls_base as a module. I tried - it worked, but I didn't actually > use any of the codepages. Just tried insmod nls_base, insmod <fs>, mount. > So, is it desired / really this trivial or are there some real reasons why > nls_base cannot be properly done as a module? I am attaching a naive > patch - but not really understanding NLS internals and not being able to > extensively test it, it might be not quite correct. Sound good to me. And I like this, but it may be more test needed (i.e. module autoload etc.). So I suggest it start on development tree. And backport after it. > # msdos and Joliet want NLS > -if [ "$CONFIG_JOLIET" = "y" -o "$CONFIG_FAT_FS" != "n" \ > - -o "$CONFIG_NTFS_FS" != "n" -o "$CONFIG_NCPFS_NLS" = "y" \ > +if [ "$CONFIG_JOLIET" = "y" -o "$CONFIG_FAT_FS" = "y" \ > + -o "$CONFIG_NTFS_FS" = "y" -o "$CONFIG_NCPFS_NLS" = "y" \ > -o "$CONFIG_SMB_NLS" = "y" ]; then > define_bool CONFIG_NLS y > else > - define_bool CONFIG_NLS n > + tristate 'Base NLS support' CONFIG_NLS > fi Looks like module dependency was broken. > +static int __init init_nls_base(void) > +{ > + return 0; > +} > + > +static void __exit exit_nls_base(void) > +{ > +} > + > +module_init(init_nls_base) > +module_exit(exit_nls_base) Was this really needed? -- OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] NLS as module 2003-10-25 10:53 ` OGAWA Hirofumi @ 2003-10-25 22:55 ` Guennadi Liakhovetski 2003-10-25 23:18 ` Randy.Dunlap 0 siblings, 1 reply; 6+ messages in thread From: Guennadi Liakhovetski @ 2003-10-25 22:55 UTC (permalink / raw) To: OGAWA Hirofumi; +Cc: Guennadi Liakhovetski, linux-kernel On Sat, 25 Oct 2003, OGAWA Hirofumi wrote: > Guennadi Liakhovetski <g.liakhovetski@gmx.de> writes: > > > Problem: NLS support can only be compiled in the kernel - and not as a > > module. And if you don't configure one of Joliet / FAT and some other > > filesystems at kernel compile-time, you can't compile these filesystems > > later as modules(*). However, I see nothing that would prevent one from > > compiling nls_base as a module. I tried - it worked, but I didn't actually > > use any of the codepages. Just tried insmod nls_base, insmod <fs>, mount. > > So, is it desired / really this trivial or are there some real reasons why > > nls_base cannot be properly done as a module? I am attaching a naive > > patch - but not really understanding NLS internals and not being able to > > extensively test it, it might be not quite correct. > > Sound good to me. And I like this, but it may be more test needed > (i.e. module autoload etc.). So I suggest it start on development > tree. And backport after it. Sure. Attached is a patch against 2.6.0-test7. Looks like it's not going to make it into 2.6.0, but, maybe later. And I reversed the dependencies - looks more logical, that FAT, SMB, etc. depend on NLS, and not vise versa. I tested it briefly, seems to work. Guennadi --- Guennadi Liakhovetski diff -ur linux-2.6.0-test7/fs/Kconfig linux-2.6.0-test7.new/fs/Kconfig --- linux-2.6.0-test7/fs/Kconfig Thu Oct 9 22:11:31 2003 +++ linux-2.6.0-test7.new/fs/Kconfig Sat Oct 25 21:24:13 2003 @@ -246,6 +246,7 @@ config JFS_FS tristate "JFS filesystem support" + depends on NLS help This is a port of IBM's Journaled Filesystem . More information is available in the file Documentation/filesystems/jfs.txt. @@ -464,6 +465,8 @@ local network, you probably do not need an automounter, and can say N here. +source "fs/nls/Kconfig" + menu "CD-ROM/DVD Filesystems" config ISO9660_FS @@ -484,7 +487,7 @@ config JOLIET bool "Microsoft Joliet CDROM extensions" - depends on ISO9660_FS + depends on ISO9660_FS && NLS help Joliet is a Microsoft extension for the ISO 9660 CD-ROM file system which allows for long filenames in unicode format (unicode is the @@ -530,6 +533,7 @@ config FAT_FS tristate "DOS FAT fs support" + depends on NLS help If you want to use one of the FAT-based file systems (the MS-DOS, VFAT (Windows 95) and UMSDOS (used to run Linux on top of an @@ -651,6 +655,7 @@ config NTFS_FS tristate "NTFS file system support" + depends on NLS help NTFS is the file system of Microsoft Windows NT, 2000, XP and 2003. @@ -961,7 +966,7 @@ config BEFS_FS tristate "BeOS file systemv(BeFS) support (read only) (EXPERIMENTAL)" - depends on EXPERIMENTAL + depends on EXPERIMENTAL && NLS help The BeOS File System (BeFS) is the native file system of Be, Inc's BeOS. Notable features include support for arbitrary attributes @@ -1415,7 +1420,7 @@ config SMB_FS tristate "SMB file system support (to mount Windows shares etc.)" - depends on INET + depends on INET && NLS help SMB (Server Message Block) is the protocol Windows for Workgroups (WfW), Windows 95/98, Windows NT and OS/2 Lan Manager use to share @@ -1470,7 +1475,7 @@ config CIFS tristate "CIFS support (advanced network filesystem for Samba, Window and other CIFS compliant servers)(EXPERIMENTAL)" - depends on INET + depends on INET && NLS help This is the client VFS module for the Common Internet File System (CIFS) protocol which is the successor to the Server Message Block @@ -1585,8 +1590,6 @@ source "fs/partitions/Kconfig" endmenu - -source "fs/nls/Kconfig" endmenu diff -ur linux-2.6.0-test7/fs/ncpfs/Kconfig linux-2.6.0-test7.new/fs/ncpfs/Kconfig --- linux-2.6.0-test7/fs/ncpfs/Kconfig Sat Aug 9 06:33:21 2003 +++ linux-2.6.0-test7.new/fs/ncpfs/Kconfig Sat Oct 25 21:01:08 2003 @@ -64,7 +64,7 @@ config NCPFS_NLS bool "Use Native Language Support" - depends on NCP_FS + depends on NCP_FS && NLS help Allows you to use codepages and I/O charsets for file name translation between the server file system and input/output. This diff -ur linux-2.6.0-test7/fs/nls/Kconfig linux-2.6.0-test7.new/fs/nls/Kconfig --- linux-2.6.0-test7/fs/nls/Kconfig Sat Aug 9 06:31:05 2003 +++ linux-2.6.0-test7.new/fs/nls/Kconfig Sat Oct 25 21:27:58 2003 @@ -1,24 +1,32 @@ # # Native language support configuration # -# smb wants NLS -config SMB_NLS - bool - depends on SMB_FS - default y -# msdos and Joliet want NLS +menu "Native Language Support" + config NLS - bool - depends on JOLIET || FAT_FS || NTFS_FS || NCPFS_NLS || SMB_NLS || JFS_FS || CIFS || BEFS_FS + tristate 'Base native language support' default y + ---help--- + The base Native Language Support. A number of filesystems + depend on it (e.g. FAT, JOLIET, NT, BEOS filesystems), as well + as the ability of some filesystems to use native languages + (NCP, SMB). + If unsure, say Y. -menu "Native Language Support" - depends on NLS + To compile this code as a module, choose M here: the module + will be called nls_base. + +# smb wants NLS +config SMB_NLS + bool + depends on SMB_FS && NLS + default y config NLS_DEFAULT string "Default NLS Option" + depends on NLS default "iso8859-1" ---help--- The default NLS used when mounting file system. Note, that this is @@ -38,6 +46,7 @@ config NLS_CODEPAGE_437 tristate "Codepage 437 (United States, Canada)" + depends on NLS help The Microsoft FAT file system family can deal with filenames in native language character sets. These character sets are stored @@ -50,6 +59,7 @@ config NLS_CODEPAGE_737 tristate "Codepage 737 (Greek)" + depends on NLS help The Microsoft FAT file system family can deal with filenames in native language character sets. These character sets are stored @@ -62,6 +72,7 @@ config NLS_CODEPAGE_775 tristate "Codepage 775 (Baltic Rim)" + depends on NLS help The Microsoft FAT file system family can deal with filenames in native language character sets. These character sets are stored @@ -75,6 +86,7 @@ config NLS_CODEPAGE_850 tristate "Codepage 850 (Europe)" + depends on NLS ---help--- The Microsoft FAT file system family can deal with filenames in native language character sets. These character sets are stored in @@ -91,6 +103,7 @@ config NLS_CODEPAGE_852 tristate "Codepage 852 (Central/Eastern Europe)" + depends on NLS ---help--- The Microsoft FAT file system family can deal with filenames in native language character sets. These character sets are stored in @@ -106,6 +119,7 @@ config NLS_CODEPAGE_855 tristate "Codepage 855 (Cyrillic)" + depends on NLS help The Microsoft FAT file system family can deal with filenames in native language character sets. These character sets are stored in @@ -117,6 +131,7 @@ config NLS_CODEPAGE_857 tristate "Codepage 857 (Turkish)" + depends on NLS help The Microsoft FAT file system family can deal with filenames in native language character sets. These character sets are stored in @@ -128,6 +143,7 @@ config NLS_CODEPAGE_860 tristate "Codepage 860 (Portuguese)" + depends on NLS help The Microsoft FAT file system family can deal with filenames in native language character sets. These character sets are stored in @@ -139,6 +155,7 @@ config NLS_CODEPAGE_861 tristate "Codepage 861 (Icelandic)" + depends on NLS help The Microsoft FAT file system family can deal with filenames in native language character sets. These character sets are stored in @@ -150,6 +167,7 @@ config NLS_CODEPAGE_862 tristate "Codepage 862 (Hebrew)" + depends on NLS help The Microsoft FAT file system family can deal with filenames in native language character sets. These character sets are stored in @@ -161,6 +179,7 @@ config NLS_CODEPAGE_863 tristate "Codepage 863 (Canadian French)" + depends on NLS help The Microsoft FAT file system family can deal with filenames in native language character sets. These character sets are stored in @@ -173,6 +192,7 @@ config NLS_CODEPAGE_864 tristate "Codepage 864 (Arabic)" + depends on NLS help The Microsoft FAT file system family can deal with filenames in native language character sets. These character sets are stored in @@ -184,6 +204,7 @@ config NLS_CODEPAGE_865 tristate "Codepage 865 (Norwegian, Danish)" + depends on NLS help The Microsoft FAT file system family can deal with filenames in native language character sets. These character sets are stored in @@ -196,6 +217,7 @@ config NLS_CODEPAGE_866 tristate "Codepage 866 (Cyrillic/Russian)" + depends on NLS help The Microsoft FAT file system family can deal with filenames in native language character sets. These character sets are stored in @@ -208,6 +230,7 @@ config NLS_CODEPAGE_869 tristate "Codepage 869 (Greek)" + depends on NLS help The Microsoft FAT file system family can deal with filenames in native language character sets. These character sets are stored in @@ -219,6 +242,7 @@ config NLS_CODEPAGE_936 tristate "Simplified Chinese charset (CP936, GB2312)" + depends on NLS help The Microsoft FAT file system family can deal with filenames in native language character sets. These character sets are stored in @@ -231,6 +255,7 @@ config NLS_CODEPAGE_950 tristate "Traditional Chinese charset (Big5)" + depends on NLS help The Microsoft FAT file system family can deal with filenames in native language character sets. These character sets are stored in @@ -243,6 +268,7 @@ config NLS_CODEPAGE_932 tristate "Japanese charsets (Shift-JIS, EUC-JP)" + depends on NLS help The Microsoft FAT file system family can deal with filenames in native language character sets. These character sets are stored in @@ -256,6 +282,7 @@ config NLS_CODEPAGE_949 tristate "Korean charset (CP949, EUC-KR)" + depends on NLS help The Microsoft FAT file system family can deal with filenames in native language character sets. These character sets are stored in @@ -267,6 +294,7 @@ config NLS_CODEPAGE_874 tristate "Thai charset (CP874, TIS-620)" + depends on NLS help The Microsoft FAT file system family can deal with filenames in native language character sets. These character sets are stored in @@ -278,6 +306,7 @@ config NLS_ISO8859_8 tristate "Hebrew charsets (ISO-8859-8, CP1255)" + depends on NLS help If you want to display filenames with native language characters from the Microsoft FAT file system family or from JOLIET CD-ROMs @@ -287,6 +316,7 @@ config NLS_CODEPAGE_1250 tristate "Windows CP1250 (Slavic/Central European Languages)" + depends on NLS help If you want to display filenames with native language characters from the Microsoft FAT file system family or from JOLIET CDROMs @@ -298,6 +328,7 @@ config NLS_CODEPAGE_1251 tristate "Windows CP1251 (Bulgarian, Belarusian)" + depends on NLS help The Microsoft FAT file system family can deal with filenames in native language character sets. These character sets are stored in @@ -310,6 +341,7 @@ config NLS_ISO8859_1 tristate "NLS ISO 8859-1 (Latin 1; Western European Languages)" + depends on NLS help If you want to display filenames with native language characters from the Microsoft FAT file system family or from JOLIET CD-ROMs @@ -322,6 +354,7 @@ config NLS_ISO8859_2 tristate "NLS ISO 8859-2 (Latin 2; Slavic/Central European Languages)" + depends on NLS help If you want to display filenames with native language characters from the Microsoft FAT file system family or from JOLIET CD-ROMs @@ -333,6 +366,7 @@ config NLS_ISO8859_3 tristate "NLS ISO 8859-3 (Latin 3; Esperanto, Galician, Maltese, Turkish)" + depends on NLS help If you want to display filenames with native language characters from the Microsoft FAT file system family or from JOLIET CD-ROMs @@ -343,6 +377,7 @@ config NLS_ISO8859_4 tristate "NLS ISO 8859-4 (Latin 4; old Baltic charset)" + depends on NLS help If you want to display filenames with native language characters from the Microsoft FAT file system family or from JOLIET CD-ROMs @@ -353,6 +388,7 @@ config NLS_ISO8859_5 tristate "NLS ISO 8859-5 (Cyrillic)" + depends on NLS help If you want to display filenames with native language characters from the Microsoft FAT file system family or from JOLIET CD-ROMs @@ -364,6 +400,7 @@ config NLS_ISO8859_6 tristate "NLS ISO 8859-6 (Arabic)" + depends on NLS help If you want to display filenames with native language characters from the Microsoft FAT file system family or from JOLIET CD-ROMs @@ -373,6 +410,7 @@ config NLS_ISO8859_7 tristate "NLS ISO 8859-7 (Modern Greek)" + depends on NLS help If you want to display filenames with native language characters from the Microsoft FAT file system family or from JOLIET CD-ROMs @@ -382,6 +420,7 @@ config NLS_ISO8859_9 tristate "NLS ISO 8859-9 (Latin 5; Turkish)" + depends on NLS help If you want to display filenames with native language characters from the Microsoft FAT file system family or from JOLIET CD-ROMs @@ -392,6 +431,7 @@ config NLS_ISO8859_13 tristate "NLS ISO 8859-13 (Latin 7; Baltic)" + depends on NLS help If you want to display filenames with native language characters from the Microsoft FAT file system family or from JOLIET CD-ROMs @@ -402,6 +442,7 @@ config NLS_ISO8859_14 tristate "NLS ISO 8859-14 (Latin 8; Celtic)" + depends on NLS help If you want to display filenames with native language characters from the Microsoft FAT file system family or from JOLIET CD-ROMs @@ -413,6 +454,7 @@ config NLS_ISO8859_15 tristate "NLS ISO 8859-15 (Latin 9; Western European Languages with Euro)" + depends on NLS ---help--- If you want to display filenames with native language characters from the Microsoft FAT file system family or from JOLIET CD-ROMs @@ -429,6 +471,7 @@ config NLS_KOI8_R tristate "NLS KOI8-R (Russian)" + depends on NLS help If you want to display filenames with native language characters from the Microsoft FAT file system family or from JOLIET CD-ROMs @@ -438,6 +481,7 @@ config NLS_KOI8_U tristate "NLS KOI8-U/RU (Ukrainian, Belarusian)" + depends on NLS help If you want to display filenames with native language characters from the Microsoft FAT file system family or from JOLIET CD-ROMs @@ -447,6 +491,7 @@ config NLS_UTF8 tristate "NLS UTF8" + depends on NLS help If you want to display filenames with native language characters from the Microsoft FAT file system family or from JOLIET CD-ROMs diff -ur linux-2.6.0-test7/fs/nls/nls_base.c linux-2.6.0-test7.new/fs/nls/nls_base.c --- linux-2.6.0-test7/fs/nls/nls_base.c Wed Oct 8 23:28:18 2003 +++ linux-2.6.0-test7.new/fs/nls/nls_base.c Sat Oct 25 21:18:54 2003 @@ -480,7 +480,7 @@ if (default_nls != NULL) return default_nls; else - return &default_table; + return &default_table; } EXPORT_SYMBOL(register_nls); @@ -492,3 +492,5 @@ EXPORT_SYMBOL(utf8_mbstowcs); EXPORT_SYMBOL(utf8_wctomb); EXPORT_SYMBOL(utf8_wcstombs); + +MODULE_LICENSE("Dual BSD/GPL"); ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] NLS as module 2003-10-25 22:55 ` Guennadi Liakhovetski @ 2003-10-25 23:18 ` Randy.Dunlap 2003-10-26 15:58 ` OGAWA Hirofumi 0 siblings, 1 reply; 6+ messages in thread From: Randy.Dunlap @ 2003-10-25 23:18 UTC (permalink / raw) To: Guennadi Liakhovetski; +Cc: hirofumi, g.liakhovetski, linux-kernel On Sun, 26 Oct 2003 00:55:18 +0200 (CEST) Guennadi Liakhovetski <g.liakhovetski@gmx.de> wrote: | On Sat, 25 Oct 2003, OGAWA Hirofumi wrote: | | > Guennadi Liakhovetski <g.liakhovetski@gmx.de> writes: | > | > > Problem: NLS support can only be compiled in the kernel - and not as a | > > module. And if you don't configure one of Joliet / FAT and some other | > > filesystems at kernel compile-time, you can't compile these filesystems | > > later as modules(*). However, I see nothing that would prevent one from | > > compiling nls_base as a module. I tried - it worked, but I didn't actually | > > use any of the codepages. Just tried insmod nls_base, insmod <fs>, mount. | > > So, is it desired / really this trivial or are there some real reasons why | > > nls_base cannot be properly done as a module? I am attaching a naive | > > patch - but not really understanding NLS internals and not being able to | > > extensively test it, it might be not quite correct. | > | > Sound good to me. And I like this, but it may be more test needed | > (i.e. module autoload etc.). So I suggest it start on development | > tree. And backport after it. | | Sure. Attached is a patch against 2.6.0-test7. Looks like it's not going | to make it into 2.6.0, but, maybe later. And I reversed the dependencies - | looks more logical, that FAT, SMB, etc. depend on NLS, and not vise versa. | I tested it briefly, seems to work. I would prefer to see the opposite: selecting an FS that requires NLS should force NLS to be enabled, via "select NLS". For example: | diff -ur linux-2.6.0-test7/fs/Kconfig linux-2.6.0-test7.new/fs/Kconfig | --- linux-2.6.0-test7/fs/Kconfig Thu Oct 9 22:11:31 2003 | +++ linux-2.6.0-test7.new/fs/Kconfig Sat Oct 25 21:24:13 2003 | @@ -246,6 +246,7 @@ | | config JFS_FS | tristate "JFS filesystem support" | - depends on NLS select NLS | help | This is a port of IBM's Journaled Filesystem . More information is | available in the file Documentation/filesystems/jfs.txt. | @@ -464,6 +465,8 @@ | local network, you probably do not need an automounter, and can say | N here. -- ~Randy ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] NLS as module 2003-10-25 23:18 ` Randy.Dunlap @ 2003-10-26 15:58 ` OGAWA Hirofumi 2003-10-26 19:27 ` Guennadi Liakhovetski 0 siblings, 1 reply; 6+ messages in thread From: OGAWA Hirofumi @ 2003-10-26 15:58 UTC (permalink / raw) To: Randy.Dunlap; +Cc: Guennadi Liakhovetski, linux-kernel "Randy.Dunlap" <rddunlap@osdl.org> writes: > I would prefer to see the opposite: selecting an FS that requires NLS > should force NLS to be enabled, via "select NLS". Yes, sure. The following include it fix. - use "select" instead of "depend" - remove the unused SMB_NLS - remove unneeded "default y" of CONFIG_NLS - revert to postion of nls menu (middle of filessytem menus is strange) - fix "#ifdef CONFIG_NLS" on UDF (should this add new one to Kconfig?) linux-2.6.0-test9-test-hirofumi/fs/Kconfig | 7 ++ linux-2.6.0-test9-test-hirofumi/fs/ncpfs/Kconfig | 1 linux-2.6.0-test9-test-hirofumi/fs/nls/Kconfig | 60 +++++++++++++++++----- linux-2.6.0-test9-test-hirofumi/fs/nls/nls_base.c | 4 + linux-2.6.0-test9-test-hirofumi/fs/udf/super.c | 8 +- 5 files changed, 64 insertions(+), 16 deletions(-) diff -puN fs/Kconfig~nls_module fs/Kconfig --- linux-2.6.0-test9-test/fs/Kconfig~nls_module 2003-10-26 16:19:20.000000000 +0900 +++ linux-2.6.0-test9-test-hirofumi/fs/Kconfig 2003-10-26 16:23:17.000000000 +0900 @@ -246,6 +246,7 @@ config REISERFS_PROC_INFO config JFS_FS tristate "JFS filesystem support" + select NLS help This is a port of IBM's Journaled Filesystem . More information is available in the file Documentation/filesystems/jfs.txt. @@ -485,6 +486,7 @@ config ISO9660_FS config JOLIET bool "Microsoft Joliet CDROM extensions" depends on ISO9660_FS + select NLS help Joliet is a Microsoft extension for the ISO 9660 CD-ROM file system which allows for long filenames in unicode format (unicode is the @@ -530,6 +532,7 @@ menu "DOS/FAT/NT Filesystems" config FAT_FS tristate "DOS FAT fs support" + select NLS help If you want to use one of the FAT-based file systems (the MS-DOS, VFAT (Windows 95) and UMSDOS (used to run Linux on top of an @@ -651,6 +654,7 @@ config UMSDOS_FS config NTFS_FS tristate "NTFS file system support" + select NLS help NTFS is the file system of Microsoft Windows NT, 2000, XP and 2003. @@ -962,6 +966,7 @@ config HFS_FS config BEFS_FS tristate "BeOS file systemv(BeFS) support (read only) (EXPERIMENTAL)" depends on EXPERIMENTAL + select NLS help The BeOS File System (BeFS) is the native file system of Be, Inc's BeOS. Notable features include support for arbitrary attributes @@ -1440,6 +1445,7 @@ config RPCSEC_GSS_KRB5 config SMB_FS tristate "SMB file system support (to mount Windows shares etc.)" depends on INET + select NLS help SMB (Server Message Block) is the protocol Windows for Workgroups (WfW), Windows 95/98, Windows NT and OS/2 Lan Manager use to share @@ -1495,6 +1501,7 @@ config SMB_NLS_REMOTE config CIFS tristate "CIFS support (advanced network filesystem for Samba, Window and other CIFS compliant servers)(EXPERIMENTAL)" depends on INET + select NLS help This is the client VFS module for the Common Internet File System (CIFS) protocol which is the successor to the Server Message Block diff -puN fs/ncpfs/Kconfig~nls_module fs/ncpfs/Kconfig --- linux-2.6.0-test9-test/fs/ncpfs/Kconfig~nls_module 2003-10-26 16:19:20.000000000 +0900 +++ linux-2.6.0-test9-test-hirofumi/fs/ncpfs/Kconfig 2003-10-26 16:22:42.000000000 +0900 @@ -65,6 +65,7 @@ config NCPFS_SMALLDOS config NCPFS_NLS bool "Use Native Language Support" depends on NCP_FS + select NLS help Allows you to use codepages and I/O charsets for file name translation between the server file system and input/output. This diff -puN fs/nls/Kconfig~nls_module fs/nls/Kconfig --- linux-2.6.0-test9-test/fs/nls/Kconfig~nls_module 2003-10-26 16:19:20.000000000 +0900 +++ linux-2.6.0-test9-test-hirofumi/fs/nls/Kconfig 2003-10-26 16:36:02.000000000 +0900 @@ -1,24 +1,25 @@ # # Native language support configuration # -# smb wants NLS -config SMB_NLS - bool - depends on SMB_FS - default y -# msdos and Joliet want NLS +menu "Native Language Support" + config NLS - bool - depends on JOLIET || FAT_FS || NTFS_FS || NCPFS_NLS || SMB_NLS || JFS_FS || CIFS || BEFS_FS - default y + tristate "Base native language support" + ---help--- + The base Native Language Support. A number of filesystems + depend on it (e.g. FAT, JOLIET, NT, BEOS filesystems), as well + as the ability of some filesystems to use native languages + (NCP, SMB). + If unsure, say Y. -menu "Native Language Support" - depends on NLS + To compile this code as a module, choose M here: the module + will be called nls_base. config NLS_DEFAULT string "Default NLS Option" + depends on NLS default "iso8859-1" ---help--- The default NLS used when mounting file system. Note, that this is @@ -38,6 +39,7 @@ config NLS_DEFAULT config NLS_CODEPAGE_437 tristate "Codepage 437 (United States, Canada)" + depends on NLS help The Microsoft FAT file system family can deal with filenames in native language character sets. These character sets are stored @@ -50,6 +52,7 @@ config NLS_CODEPAGE_437 config NLS_CODEPAGE_737 tristate "Codepage 737 (Greek)" + depends on NLS help The Microsoft FAT file system family can deal with filenames in native language character sets. These character sets are stored @@ -62,6 +65,7 @@ config NLS_CODEPAGE_737 config NLS_CODEPAGE_775 tristate "Codepage 775 (Baltic Rim)" + depends on NLS help The Microsoft FAT file system family can deal with filenames in native language character sets. These character sets are stored @@ -75,6 +79,7 @@ config NLS_CODEPAGE_775 config NLS_CODEPAGE_850 tristate "Codepage 850 (Europe)" + depends on NLS ---help--- The Microsoft FAT file system family can deal with filenames in native language character sets. These character sets are stored in @@ -91,6 +96,7 @@ config NLS_CODEPAGE_850 config NLS_CODEPAGE_852 tristate "Codepage 852 (Central/Eastern Europe)" + depends on NLS ---help--- The Microsoft FAT file system family can deal with filenames in native language character sets. These character sets are stored in @@ -106,6 +112,7 @@ config NLS_CODEPAGE_852 config NLS_CODEPAGE_855 tristate "Codepage 855 (Cyrillic)" + depends on NLS help The Microsoft FAT file system family can deal with filenames in native language character sets. These character sets are stored in @@ -117,6 +124,7 @@ config NLS_CODEPAGE_855 config NLS_CODEPAGE_857 tristate "Codepage 857 (Turkish)" + depends on NLS help The Microsoft FAT file system family can deal with filenames in native language character sets. These character sets are stored in @@ -128,6 +136,7 @@ config NLS_CODEPAGE_857 config NLS_CODEPAGE_860 tristate "Codepage 860 (Portuguese)" + depends on NLS help The Microsoft FAT file system family can deal with filenames in native language character sets. These character sets are stored in @@ -139,6 +148,7 @@ config NLS_CODEPAGE_860 config NLS_CODEPAGE_861 tristate "Codepage 861 (Icelandic)" + depends on NLS help The Microsoft FAT file system family can deal with filenames in native language character sets. These character sets are stored in @@ -150,6 +160,7 @@ config NLS_CODEPAGE_861 config NLS_CODEPAGE_862 tristate "Codepage 862 (Hebrew)" + depends on NLS help The Microsoft FAT file system family can deal with filenames in native language character sets. These character sets are stored in @@ -161,6 +172,7 @@ config NLS_CODEPAGE_862 config NLS_CODEPAGE_863 tristate "Codepage 863 (Canadian French)" + depends on NLS help The Microsoft FAT file system family can deal with filenames in native language character sets. These character sets are stored in @@ -173,6 +185,7 @@ config NLS_CODEPAGE_863 config NLS_CODEPAGE_864 tristate "Codepage 864 (Arabic)" + depends on NLS help The Microsoft FAT file system family can deal with filenames in native language character sets. These character sets are stored in @@ -184,6 +197,7 @@ config NLS_CODEPAGE_864 config NLS_CODEPAGE_865 tristate "Codepage 865 (Norwegian, Danish)" + depends on NLS help The Microsoft FAT file system family can deal with filenames in native language character sets. These character sets are stored in @@ -196,6 +210,7 @@ config NLS_CODEPAGE_865 config NLS_CODEPAGE_866 tristate "Codepage 866 (Cyrillic/Russian)" + depends on NLS help The Microsoft FAT file system family can deal with filenames in native language character sets. These character sets are stored in @@ -208,6 +223,7 @@ config NLS_CODEPAGE_866 config NLS_CODEPAGE_869 tristate "Codepage 869 (Greek)" + depends on NLS help The Microsoft FAT file system family can deal with filenames in native language character sets. These character sets are stored in @@ -219,6 +235,7 @@ config NLS_CODEPAGE_869 config NLS_CODEPAGE_936 tristate "Simplified Chinese charset (CP936, GB2312)" + depends on NLS help The Microsoft FAT file system family can deal with filenames in native language character sets. These character sets are stored in @@ -231,6 +248,7 @@ config NLS_CODEPAGE_936 config NLS_CODEPAGE_950 tristate "Traditional Chinese charset (Big5)" + depends on NLS help The Microsoft FAT file system family can deal with filenames in native language character sets. These character sets are stored in @@ -243,6 +261,7 @@ config NLS_CODEPAGE_950 config NLS_CODEPAGE_932 tristate "Japanese charsets (Shift-JIS, EUC-JP)" + depends on NLS help The Microsoft FAT file system family can deal with filenames in native language character sets. These character sets are stored in @@ -256,6 +275,7 @@ config NLS_CODEPAGE_932 config NLS_CODEPAGE_949 tristate "Korean charset (CP949, EUC-KR)" + depends on NLS help The Microsoft FAT file system family can deal with filenames in native language character sets. These character sets are stored in @@ -267,6 +287,7 @@ config NLS_CODEPAGE_949 config NLS_CODEPAGE_874 tristate "Thai charset (CP874, TIS-620)" + depends on NLS help The Microsoft FAT file system family can deal with filenames in native language character sets. These character sets are stored in @@ -278,6 +299,7 @@ config NLS_CODEPAGE_874 config NLS_ISO8859_8 tristate "Hebrew charsets (ISO-8859-8, CP1255)" + depends on NLS help If you want to display filenames with native language characters from the Microsoft FAT file system family or from JOLIET CD-ROMs @@ -287,6 +309,7 @@ config NLS_ISO8859_8 config NLS_CODEPAGE_1250 tristate "Windows CP1250 (Slavic/Central European Languages)" + depends on NLS help If you want to display filenames with native language characters from the Microsoft FAT file system family or from JOLIET CDROMs @@ -298,6 +321,7 @@ config NLS_CODEPAGE_1250 config NLS_CODEPAGE_1251 tristate "Windows CP1251 (Bulgarian, Belarusian)" + depends on NLS help The Microsoft FAT file system family can deal with filenames in native language character sets. These character sets are stored in @@ -310,6 +334,7 @@ config NLS_CODEPAGE_1251 config NLS_ISO8859_1 tristate "NLS ISO 8859-1 (Latin 1; Western European Languages)" + depends on NLS help If you want to display filenames with native language characters from the Microsoft FAT file system family or from JOLIET CD-ROMs @@ -322,6 +347,7 @@ config NLS_ISO8859_1 config NLS_ISO8859_2 tristate "NLS ISO 8859-2 (Latin 2; Slavic/Central European Languages)" + depends on NLS help If you want to display filenames with native language characters from the Microsoft FAT file system family or from JOLIET CD-ROMs @@ -333,6 +359,7 @@ config NLS_ISO8859_2 config NLS_ISO8859_3 tristate "NLS ISO 8859-3 (Latin 3; Esperanto, Galician, Maltese, Turkish)" + depends on NLS help If you want to display filenames with native language characters from the Microsoft FAT file system family or from JOLIET CD-ROMs @@ -343,6 +370,7 @@ config NLS_ISO8859_3 config NLS_ISO8859_4 tristate "NLS ISO 8859-4 (Latin 4; old Baltic charset)" + depends on NLS help If you want to display filenames with native language characters from the Microsoft FAT file system family or from JOLIET CD-ROMs @@ -353,6 +381,7 @@ config NLS_ISO8859_4 config NLS_ISO8859_5 tristate "NLS ISO 8859-5 (Cyrillic)" + depends on NLS help If you want to display filenames with native language characters from the Microsoft FAT file system family or from JOLIET CD-ROMs @@ -364,6 +393,7 @@ config NLS_ISO8859_5 config NLS_ISO8859_6 tristate "NLS ISO 8859-6 (Arabic)" + depends on NLS help If you want to display filenames with native language characters from the Microsoft FAT file system family or from JOLIET CD-ROMs @@ -373,6 +403,7 @@ config NLS_ISO8859_6 config NLS_ISO8859_7 tristate "NLS ISO 8859-7 (Modern Greek)" + depends on NLS help If you want to display filenames with native language characters from the Microsoft FAT file system family or from JOLIET CD-ROMs @@ -382,6 +413,7 @@ config NLS_ISO8859_7 config NLS_ISO8859_9 tristate "NLS ISO 8859-9 (Latin 5; Turkish)" + depends on NLS help If you want to display filenames with native language characters from the Microsoft FAT file system family or from JOLIET CD-ROMs @@ -392,6 +424,7 @@ config NLS_ISO8859_9 config NLS_ISO8859_13 tristate "NLS ISO 8859-13 (Latin 7; Baltic)" + depends on NLS help If you want to display filenames with native language characters from the Microsoft FAT file system family or from JOLIET CD-ROMs @@ -402,6 +435,7 @@ config NLS_ISO8859_13 config NLS_ISO8859_14 tristate "NLS ISO 8859-14 (Latin 8; Celtic)" + depends on NLS help If you want to display filenames with native language characters from the Microsoft FAT file system family or from JOLIET CD-ROMs @@ -413,6 +447,7 @@ config NLS_ISO8859_14 config NLS_ISO8859_15 tristate "NLS ISO 8859-15 (Latin 9; Western European Languages with Euro)" + depends on NLS ---help--- If you want to display filenames with native language characters from the Microsoft FAT file system family or from JOLIET CD-ROMs @@ -429,6 +464,7 @@ config NLS_ISO8859_15 config NLS_KOI8_R tristate "NLS KOI8-R (Russian)" + depends on NLS help If you want to display filenames with native language characters from the Microsoft FAT file system family or from JOLIET CD-ROMs @@ -438,6 +474,7 @@ config NLS_KOI8_R config NLS_KOI8_U tristate "NLS KOI8-U/RU (Ukrainian, Belarusian)" + depends on NLS help If you want to display filenames with native language characters from the Microsoft FAT file system family or from JOLIET CD-ROMs @@ -447,6 +484,7 @@ config NLS_KOI8_U config NLS_UTF8 tristate "NLS UTF8" + depends on NLS help If you want to display filenames with native language characters from the Microsoft FAT file system family or from JOLIET CD-ROMs diff -puN fs/nls/nls_base.c~nls_module fs/nls/nls_base.c --- linux-2.6.0-test9-test/fs/nls/nls_base.c~nls_module 2003-10-26 16:19:20.000000000 +0900 +++ linux-2.6.0-test9-test-hirofumi/fs/nls/nls_base.c 2003-10-26 16:19:20.000000000 +0900 @@ -480,7 +480,7 @@ struct nls_table *load_nls_default(void) if (default_nls != NULL) return default_nls; else - return &default_table; + return &default_table; } EXPORT_SYMBOL(register_nls); @@ -492,3 +492,5 @@ EXPORT_SYMBOL(utf8_mbtowc); EXPORT_SYMBOL(utf8_mbstowcs); EXPORT_SYMBOL(utf8_wctomb); EXPORT_SYMBOL(utf8_wcstombs); + +MODULE_LICENSE("Dual BSD/GPL"); diff -puN fs/udf/super.c~nls_module fs/udf/super.c --- linux-2.6.0-test9-test/fs/udf/super.c~nls_module 2003-10-27 00:29:13.000000000 +0900 +++ linux-2.6.0-test9-test-hirofumi/fs/udf/super.c 2003-10-27 00:29:13.000000000 +0900 @@ -414,7 +414,7 @@ udf_parse_options(char *options, struct case Opt_utf8: uopt->flags |= (1 << UDF_FLAG_UTF8); break; -#ifdef CONFIG_NLS +#if defined(CONFIG_NLS) || defined(CONFIG_NLS_MODULE) case Opt_iocharset: uopt->nls_map = load_nls(args[0].from); uopt->flags |= (1 << UDF_FLAG_NLS_MAP); @@ -1510,7 +1510,7 @@ static int udf_fill_super(struct super_b "utf8 cannot be combined with iocharset\n"); goto error_out; } -#ifdef CONFIG_NLS +#if defined(CONFIG_NLS) || defined(CONFIG_NLS_MODULE) if ((uopt.flags & (1 << UDF_FLAG_NLS_MAP)) && !uopt.nls_map) { uopt.nls_map = load_nls_default(); @@ -1674,7 +1674,7 @@ error_out: udf_release_data(UDF_SB_TYPESPAR(sb, UDF_SB_PARTITION(sb)).s_spar_map[i]); } } -#ifdef CONFIG_NLS +#if defined(CONFIG_NLS) || defined(CONFIG_NLS_MODULE) if (UDF_QUERY_FLAG(sb, UDF_FLAG_NLS_MAP)) unload_nls(UDF_SB(sb)->s_nls_map); #endif @@ -1766,7 +1766,7 @@ udf_put_super(struct super_block *sb) udf_release_data(UDF_SB_TYPESPAR(sb, UDF_SB_PARTITION(sb)).s_spar_map[i]); } } -#ifdef CONFIG_NLS +#if defined(CONFIG_NLS) || defined(CONFIG_NLS_MODULE) if (UDF_QUERY_FLAG(sb, UDF_FLAG_NLS_MAP)) unload_nls(UDF_SB(sb)->s_nls_map); #endif _ -- OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] NLS as module 2003-10-26 15:58 ` OGAWA Hirofumi @ 2003-10-26 19:27 ` Guennadi Liakhovetski 0 siblings, 0 replies; 6+ messages in thread From: Guennadi Liakhovetski @ 2003-10-26 19:27 UTC (permalink / raw) To: OGAWA Hirofumi; +Cc: Randy.Dunlap, Guennadi Liakhovetski, linux-kernel On Mon, 27 Oct 2003, OGAWA Hirofumi wrote: > "Randy.Dunlap" <rddunlap@osdl.org> writes: > > > I would prefer to see the opposite: selecting an FS that requires NLS > > should force NLS to be enabled, via "select NLS". > > Yes, sure. The following include it fix. > > - use "select" instead of "depend" > - remove the unused SMB_NLS > - remove unneeded "default y" of CONFIG_NLS > - revert to postion of nls menu (middle of filessytem menus is strange) > - fix "#ifdef CONFIG_NLS" on UDF (should this add new one to Kconfig?) Sure. Looks much better. Guennadi --- Guennadi Liakhovetski ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2003-10-26 20:06 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2003-10-23 21:36 [PATCH] NLS as module Guennadi Liakhovetski 2003-10-25 10:53 ` OGAWA Hirofumi 2003-10-25 22:55 ` Guennadi Liakhovetski 2003-10-25 23:18 ` Randy.Dunlap 2003-10-26 15:58 ` OGAWA Hirofumi 2003-10-26 19:27 ` Guennadi Liakhovetski
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox