]> git.pld-linux.org Git - packages/kernel.git/blame - kernel-nls_default.patch
- [sparc32] grsec disabled.
[packages/kernel.git] / kernel-nls_default.patch
CommitLineData
e78d94f6 1diff -Nur linux-2.6.3/fs.orig/fat/inode.c linux-2.6.3/fs/fat/inode.c
2--- linux-2.6.3/fs.orig/fat/inode.c 2004-02-18 04:57:46.000000000 +0100
3+++ linux-2.6.3/fs/fat/inode.c 2004-02-22 14:01:03.215500528 +0100
4@@ -200,7 +200,7 @@
5 seq_printf(m, ",codepage=%s", sbi->nls_disk->charset);
6 if (isvfat) {
7 if (sbi->nls_io
8- && strcmp(sbi->nls_io->charset, CONFIG_NLS_DEFAULT))
9+ && strcmp(sbi->nls_io->charset, nls_default_name))
10 seq_printf(m, ",iocharset=%s", sbi->nls_io->charset);
14ccec22 11
e78d94f6 12 switch (opts->shortname) {
13diff -Nur linux-2.6.3/fs.orig/nls/nls_base.c linux-2.6.3/fs/nls/nls_base.c
14--- linux-2.6.3/fs.orig/nls/nls_base.c 2004-02-18 04:58:32.000000000 +0100
15+++ linux-2.6.3/fs/nls/nls_base.c 2004-02-22 14:02:34.984549512 +0100
16@@ -19,6 +19,8 @@
14ccec22 17 #endif
18 #include <linux/spinlock.h>
19
20+char nls_default_name[40] = CONFIG_NLS_DEFAULT;
21+
e78d94f6 22 static struct nls_table default_table;
23 static struct nls_table *tables = &default_table;
14ccec22 24 static spinlock_t nls_lock = SPIN_LOCK_UNLOCKED;
e78d94f6 25@@ -477,13 +479,14 @@
14ccec22 26 {
27 struct nls_table *default_nls;
28
29- default_nls = load_nls(CONFIG_NLS_DEFAULT);
30+ default_nls = load_nls(nls_default_name);
31 if (default_nls != NULL)
32 return default_nls;
33 else
e78d94f6 34 return &default_table;
14ccec22 35 }
36
37+EXPORT_SYMBOL(nls_default_name);
38 EXPORT_SYMBOL(register_nls);
39 EXPORT_SYMBOL(unregister_nls);
40 EXPORT_SYMBOL(unload_nls);
e78d94f6 41diff -Nur linux-2.6.3/fs.orig/smbfs/inode.c linux-2.6.3/fs/smbfs/inode.c
42--- linux-2.6.3/fs.orig/smbfs/inode.c 2004-02-18 04:57:16.000000000 +0100
43+++ linux-2.6.3/fs/smbfs/inode.c 2004-02-22 14:03:11.597983424 +0100
44@@ -436,7 +436,7 @@
14ccec22 45 seq_printf(s, ",file_mode=%04o", mnt->file_mode & S_IRWXUGO);
46 seq_printf(s, ",dir_mode=%04o", mnt->dir_mode & S_IRWXUGO);
47
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);
e78d94f6 53@@ -542,7 +542,7 @@
54 mnt = server->mnt;
14ccec22 55
56 memset(mnt, 0, sizeof(struct smb_mount_data_kernel));
e78d94f6 57- strlcpy(mnt->codepage.local_name, CONFIG_NLS_DEFAULT,
58+ strlcpy(mnt->codepage.local_name, nls_default_name,
14ccec22 59 SMB_NLS_MAXNAMELEN);
e78d94f6 60 strlcpy(mnt->codepage.remote_name, SMB_NLS_REMOTE,
14ccec22 61 SMB_NLS_MAXNAMELEN);
e78d94f6 62diff -Nur linux-2.6.3/include.orig/linux/nls.h linux-2.6.3/include/linux/nls.h
63--- linux-2.6.3/include.orig/linux/nls.h 2004-02-18 04:57:22.000000000 +0100
64+++ linux-2.6.3/include/linux/nls.h 2004-02-22 13:59:25.000000000 +0100
65@@ -22,6 +22,8 @@
14ccec22 66 #define NLS_MAX_CHARSET_SIZE 6 /* for UTF-8 */
67
68 /* nls.c */
69+extern char nls_default_name[];
70+
71 extern int register_nls(struct nls_table *);
72 extern int unregister_nls(struct nls_table *);
73 extern struct nls_table *load_nls(char *);
e78d94f6 74diff -Nur linux-2.6.3/include.orig/linux/sysctl.h linux-2.6.3/include/linux/sysctl.h
75--- linux-2.6.3/include.orig/linux/sysctl.h 2004-02-22 13:54:09.000000000 +0100
76+++ linux-2.6.3/include/linux/sysctl.h 2004-02-22 13:58:56.000000000 +0100
77@@ -624,6 +624,7 @@
14ccec22 78 FS_XFS=17, /* struct: control xfs parameters */
e78d94f6 79 FS_AIO_NR=18, /* current system-wide number of aio requests */
80 FS_AIO_MAX_NR=19, /* system-wide maximum number of aio requests */
81+ FS_NLS_DEFAULT=20, /* string:default console character set */
14ccec22 82 };
83
84 /* /proc/sys/fs/quota/ */
e78d94f6 85diff -Nur linux-2.6.3/kernel.orig/sysctl.c linux-2.6.3/kernel/sysctl.c
86--- linux-2.6.3/kernel.orig/sysctl.c 2004-02-22 13:54:09.000000000 +0100
87+++ linux-2.6.3/kernel/sysctl.c 2004-02-22 13:58:02.000000000 +0100
88@@ -74,6 +74,9 @@
14ccec22 89 #ifdef CONFIG_HOTPLUG
90 extern char hotplug_path[];
91 #endif
92+#ifdef CONFIG_NLS
93+extern char nls_default_name[];
94+#endif
95 #ifdef CONFIG_CHR_DEV_SG
96 extern int sg_big_buff;
97 #endif
e78d94f6 98@@ -844,6 +847,17 @@
99 .mode = 0644,
100 .proc_handler = &proc_dointvec,
101 },
14ccec22 102+#ifdef CONFIG_NLS
e78d94f6 103+ {
104+ .ctl_name = FS_NLS_DEFAULT,
105+ .procname = "nls-default",
106+ .data = &nls_default_name,
107+ .maxlen = 40,
108+ .mode = 0644,
109+ .proc_handler = &proc_dostring,
110+ .strategy = &sysctl_string,
111+ },
14ccec22 112+#endif
e78d94f6 113 { .ctl_name = 0 }
14ccec22 114 };
115
This page took 0.083416 seconds and 4 git commands to generate.