public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
To: "Randy.Dunlap" <rddunlap@osdl.org>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] NLS as module
Date: Mon, 27 Oct 2003 00:58:09 +0900	[thread overview]
Message-ID: <87wuas9ejy.fsf@devron.myhome.or.jp> (raw)
In-Reply-To: <20031025161847.4b13a986.rddunlap@osdl.org>

"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>

  reply	other threads:[~2003-10-26 15:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2003-10-26 19:27         ` Guennadi Liakhovetski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wuas9ejy.fsf@devron.myhome.or.jp \
    --to=hirofumi@mail.parknet.co.jp \
    --cc=g.liakhovetski@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rddunlap@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox