1 diff -Nur linux-2.4.23.orig/fs/fat/inode.c linux-2.4.23/fs/fat/inode.c
2 --- linux-2.4.23.orig/fs/fat/inode.c 2003-08-25 13:44:43.000000000 +0200
3 +++ linux-2.4.23/fs/fat/inode.c 2003-12-10 16:04:01.000000000 +0100
7 if (sbi->options.isvfat && !opts.utf8) {
8 - p = opts.iocharset ? opts.iocharset : CONFIG_NLS_DEFAULT;
9 + p = opts.iocharset ? opts.iocharset : nls_default_name;
10 sbi->nls_io = load_nls(p);
12 /* Fail only if explicit charset specified */
13 diff -Nur linux-2.4.23.orig/fs/nls/nls_base.c linux-2.4.23/fs/nls/nls_base.c
14 --- linux-2.4.23.orig/fs/nls/nls_base.c 2002-08-03 02:39:45.000000000 +0200
15 +++ linux-2.4.23/fs/nls/nls_base.c 2003-12-10 16:02:27.000000000 +0100
18 #include <linux/spinlock.h>
20 +char nls_default_name[40] = CONFIG_NLS_DEFAULT;
22 static struct nls_table *tables;
23 static spinlock_t nls_lock = SPIN_LOCK_UNLOCKED;
27 struct nls_table *default_nls;
29 - default_nls = load_nls(CONFIG_NLS_DEFAULT);
30 + default_nls = load_nls(nls_default_name);
31 if (default_nls != NULL)
34 return &default_table;
37 +EXPORT_SYMBOL(nls_default_name);
38 EXPORT_SYMBOL(register_nls);
39 EXPORT_SYMBOL(unregister_nls);
40 EXPORT_SYMBOL(unload_nls);
41 diff -Nur linux-2.4.23.orig/fs/smbfs/inode.c linux-2.4.23/fs/smbfs/inode.c
42 --- linux-2.4.23.orig/fs/smbfs/inode.c 2002-11-29 00:53:15.000000000 +0100
43 +++ linux-2.4.23/fs/smbfs/inode.c 2003-12-10 16:04:38.000000000 +0100
45 seq_printf(s, ",file_mode=%04o", mnt->file_mode & S_IRWXUGO);
46 seq_printf(s, ",dir_mode=%04o", mnt->dir_mode & S_IRWXUGO);
48 - if (strcmp(mnt->codepage.local_name, CONFIG_NLS_DEFAULT))
49 + if (strcmp(mnt->codepage.local_name, nls_default_name))
50 seq_printf(s, ",iocharset=%s", mnt->codepage.local_name);
51 if (strcmp(mnt->codepage.remote_name, SMB_NLS_REMOTE))
52 seq_printf(s, ",codepage=%s", mnt->codepage.remote_name);
56 memset(mnt, 0, sizeof(struct smb_mount_data_kernel));
57 - strncpy(mnt->codepage.local_name, CONFIG_NLS_DEFAULT,
58 + strncpy(mnt->codepage.local_name, nls_default_name,
60 strncpy(mnt->codepage.remote_name, SMB_NLS_REMOTE,
62 diff -Nur linux-2.4.23.orig/include/linux/nls.h linux-2.4.23/include/linux/nls.h
63 --- linux-2.4.23.orig/include/linux/nls.h 2002-08-03 02:39:45.000000000 +0200
64 +++ linux-2.4.23/include/linux/nls.h 2003-12-10 16:03:19.000000000 +0100
66 #define NLS_MAX_CHARSET_SIZE 6 /* for UTF-8 */
69 +extern char nls_default_name[];
71 extern int register_nls(struct nls_table *);
72 extern int unregister_nls(struct nls_table *);
73 extern struct nls_table *load_nls(char *);
74 diff -Nur linux-2.4.23.orig/include/linux/sysctl.h linux-2.4.23/include/linux/sysctl.h
75 --- linux-2.4.23.orig/include/linux/sysctl.h 2003-11-28 19:26:21.000000000 +0100
76 +++ linux-2.4.23/include/linux/sysctl.h 2003-12-10 15:55:47.000000000 +0100
78 FS_LEASE_TIME=15, /* int: maximum time to wait for a lease break */
79 FS_DQSTATS=16, /* dir: disc quota usage statistics */
80 FS_XFS=17, /* struct: control xfs parameters */
81 + FS_NLS_DEFAULT=18, /* string:default console character set */
84 /* /proc/sys/fs/quota/ */
85 diff -Nur linux-2.4.23.orig/kernel/sysctl.c linux-2.4.23/kernel/sysctl.c
86 --- linux-2.4.23.orig/kernel/sysctl.c 2003-11-28 19:26:21.000000000 +0100
87 +++ linux-2.4.23/kernel/sysctl.c 2003-12-10 16:03:30.000000000 +0100
90 extern char hotplug_path[];
93 +extern char nls_default_name[];
95 #ifdef CONFIG_CHR_DEV_SG
96 extern int sg_big_buff;
99 sizeof(int), 0644, NULL, &proc_dointvec},
100 {FS_LEASE_TIME, "lease-break-time", &lease_break_time, sizeof(int),
101 0644, NULL, &proc_dointvec},
103 + {FS_NLS_DEFAULT, "nls-default", &nls_default_name, 40,
104 + 0644, NULL, &proc_dostring, &sysctl_string },