diff -Nur linux-2.4.23.orig/fs/fat/inode.c linux-2.4.23/fs/fat/inode.c --- linux-2.4.23.orig/fs/fat/inode.c 2003-08-25 13:44:43.000000000 +0200 +++ linux-2.4.23/fs/fat/inode.c 2003-12-10 16:04:01.000000000 +0100 @@ -770,7 +770,7 @@ sbi->nls_io = NULL; if (sbi->options.isvfat && !opts.utf8) { - p = opts.iocharset ? opts.iocharset : CONFIG_NLS_DEFAULT; + p = opts.iocharset ? opts.iocharset : nls_default_name; sbi->nls_io = load_nls(p); if (! sbi->nls_io) /* Fail only if explicit charset specified */ diff -Nur linux-2.4.23.orig/fs/nls/nls_base.c linux-2.4.23/fs/nls/nls_base.c --- linux-2.4.23.orig/fs/nls/nls_base.c 2002-08-03 02:39:45.000000000 +0200 +++ linux-2.4.23/fs/nls/nls_base.c 2003-12-10 16:02:27.000000000 +0100 @@ -20,6 +20,8 @@ #endif #include +char nls_default_name[40] = CONFIG_NLS_DEFAULT; + static struct nls_table *tables; static spinlock_t nls_lock = SPIN_LOCK_UNLOCKED; @@ -483,13 +485,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.4.23.orig/fs/smbfs/inode.c linux-2.4.23/fs/smbfs/inode.c --- linux-2.4.23.orig/fs/smbfs/inode.c 2002-11-29 00:53:15.000000000 +0100 +++ linux-2.4.23/fs/smbfs/inode.c 2003-12-10 16:04:38.000000000 +0100 @@ -374,7 +374,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); @@ -468,7 +468,7 @@ server->mnt = mnt; memset(mnt, 0, sizeof(struct smb_mount_data_kernel)); - strncpy(mnt->codepage.local_name, CONFIG_NLS_DEFAULT, + strncpy(mnt->codepage.local_name, nls_default_name, SMB_NLS_MAXNAMELEN); strncpy(mnt->codepage.remote_name, SMB_NLS_REMOTE, SMB_NLS_MAXNAMELEN); diff -Nur linux-2.4.23.orig/include/linux/nls.h linux-2.4.23/include/linux/nls.h --- linux-2.4.23.orig/include/linux/nls.h 2002-08-03 02:39:45.000000000 +0200 +++ linux-2.4.23/include/linux/nls.h 2003-12-10 16:03:19.000000000 +0100 @@ -21,6 +21,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.4.23.orig/include/linux/sysctl.h linux-2.4.23/include/linux/sysctl.h --- linux-2.4.23.orig/include/linux/sysctl.h 2003-11-28 19:26:21.000000000 +0100 +++ linux-2.4.23/include/linux/sysctl.h 2003-12-10 15:55:47.000000000 +0100 @@ -608,6 +608,7 @@ FS_LEASE_TIME=15, /* int: maximum time to wait for a lease break */ FS_DQSTATS=16, /* dir: disc quota usage statistics */ FS_XFS=17, /* struct: control xfs parameters */ + FS_NLS_DEFAULT=18, /* string:default console character set */ }; /* /proc/sys/fs/quota/ */ diff -Nur linux-2.4.23.orig/kernel/sysctl.c linux-2.4.23/kernel/sysctl.c --- linux-2.4.23.orig/kernel/sysctl.c 2003-11-28 19:26:21.000000000 +0100 +++ linux-2.4.23/kernel/sysctl.c 2003-12-10 16:03:30.000000000 +0100 @@ -66,6 +66,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 @@ -342,6 +345,10 @@ sizeof(int), 0644, NULL, &proc_dointvec}, {FS_LEASE_TIME, "lease-break-time", &lease_break_time, sizeof(int), 0644, NULL, &proc_dointvec}, +#ifdef CONFIG_NLS + {FS_NLS_DEFAULT, "nls-default", &nls_default_name, 40, + 0644, NULL, &proc_dostring, &sysctl_string }, +#endif {0} };