diff -Nur linux-2.6.3/fs.orig/fat/inode.c linux-2.6.3/fs/fat/inode.c --- linux-2.6.3/fs.orig/fat/inode.c 2004-02-18 04:57:46.000000000 +0100 +++ linux-2.6.3/fs/fat/inode.c 2004-02-22 14:01:03.215500528 +0100 @@ -200,7 +200,7 @@ seq_printf(m, ",codepage=%s", sbi->nls_disk->charset); if (isvfat) { if (sbi->nls_io - && strcmp(sbi->nls_io->charset, CONFIG_NLS_DEFAULT)) + && strcmp(sbi->nls_io->charset, nls_default_name)) seq_printf(m, ",iocharset=%s", sbi->nls_io->charset); switch (opts->shortname) { diff -Nur linux-2.6.3/fs.orig/nls/nls_base.c linux-2.6.3/fs/nls/nls_base.c --- linux-2.6.3/fs.orig/nls/nls_base.c 2004-02-18 04:58:32.000000000 +0100 +++ linux-2.6.3/fs/nls/nls_base.c 2004-02-22 14:02:34.984549512 +0100 @@ -19,6 +19,8 @@ #endif #include +char nls_default_name[40] = CONFIG_NLS_DEFAULT; + static struct nls_table default_table; static struct nls_table *tables = &default_table; static spinlock_t nls_lock = SPIN_LOCK_UNLOCKED; @@ -477,13 +479,14 @@ { struct nls_table *default_nls; - default_nls = load_nls(CONFIG_NLS_DEFAULT); + default_nls = load_nls(nls_default_name); if (default_nls != NULL) return default_nls; else return &default_table; } +EXPORT_SYMBOL(nls_default_name); EXPORT_SYMBOL(register_nls); EXPORT_SYMBOL(unregister_nls); EXPORT_SYMBOL(unload_nls); diff -Nur linux-2.6.3/fs.orig/smbfs/inode.c linux-2.6.3/fs/smbfs/inode.c --- linux-2.6.3/fs.orig/smbfs/inode.c 2004-02-18 04:57:16.000000000 +0100 +++ linux-2.6.3/fs/smbfs/inode.c 2004-02-22 14:03:11.597983424 +0100 @@ -436,7 +436,7 @@ seq_printf(s, ",file_mode=%04o", mnt->file_mode & S_IRWXUGO); seq_printf(s, ",dir_mode=%04o", mnt->dir_mode & S_IRWXUGO); - if (strcmp(mnt->codepage.local_name, CONFIG_NLS_DEFAULT)) + if (strcmp(mnt->codepage.local_name, nls_default_name)) seq_printf(s, ",iocharset=%s", mnt->codepage.local_name); if (strcmp(mnt->codepage.remote_name, SMB_NLS_REMOTE)) seq_printf(s, ",codepage=%s", mnt->codepage.remote_name); @@ -542,7 +542,7 @@ mnt = server->mnt; memset(mnt, 0, sizeof(struct smb_mount_data_kernel)); - strlcpy(mnt->codepage.local_name, CONFIG_NLS_DEFAULT, + strlcpy(mnt->codepage.local_name, nls_default_name, SMB_NLS_MAXNAMELEN); strlcpy(mnt->codepage.remote_name, SMB_NLS_REMOTE, SMB_NLS_MAXNAMELEN); diff -Nur linux-2.6.3/include.orig/linux/nls.h linux-2.6.3/include/linux/nls.h --- linux-2.6.3/include.orig/linux/nls.h 2004-02-18 04:57:22.000000000 +0100 +++ linux-2.6.3/include/linux/nls.h 2004-02-22 13:59:25.000000000 +0100 @@ -22,6 +22,8 @@ #define NLS_MAX_CHARSET_SIZE 6 /* for UTF-8 */ /* nls.c */ +extern char nls_default_name[]; + extern int register_nls(struct nls_table *); extern int unregister_nls(struct nls_table *); extern struct nls_table *load_nls(char *); diff -Nur linux-2.6.3/include.orig/linux/sysctl.h linux-2.6.3/include/linux/sysctl.h --- linux-2.6.3/include.orig/linux/sysctl.h 2004-02-22 13:54:09.000000000 +0100 +++ linux-2.6.3/include/linux/sysctl.h 2004-02-22 13:58:56.000000000 +0100 @@ -624,6 +624,7 @@ FS_XFS=17, /* struct: control xfs parameters */ FS_AIO_NR=18, /* current system-wide number of aio requests */ FS_AIO_MAX_NR=19, /* system-wide maximum number of aio requests */ + FS_NLS_DEFAULT=20, /* string:default console character set */ }; /* /proc/sys/fs/quota/ */ diff -Nur linux-2.6.3/kernel.orig/sysctl.c linux-2.6.3/kernel/sysctl.c --- linux-2.6.3/kernel.orig/sysctl.c 2004-02-22 13:54:09.000000000 +0100 +++ linux-2.6.3/kernel/sysctl.c 2004-02-22 13:58:02.000000000 +0100 @@ -74,6 +74,9 @@ #ifdef CONFIG_HOTPLUG extern char hotplug_path[]; #endif +#ifdef CONFIG_NLS +extern char nls_default_name[]; +#endif #ifdef CONFIG_CHR_DEV_SG extern int sg_big_buff; #endif @@ -844,6 +847,17 @@ .mode = 0644, .proc_handler = &proc_dointvec, }, +#ifdef CONFIG_NLS + { + .ctl_name = FS_NLS_DEFAULT, + .procname = "nls-default", + .data = &nls_default_name, + .maxlen = 40, + .mode = 0644, + .proc_handler = &proc_dostring, + .strategy = &sysctl_string, + }, +#endif { .ctl_name = 0 } };