On Thu, 2006-11-09 at 16:25 +0100, Mike Galbraith wrote:
> The correct answer seems to be "fix klogd, or don't disable printk".
I don't like that answer one bit. I think it's much better to remove
the syslog interface when printk is disabled rather than leave it in
place for userland to trip over.
Signed-off-by: Mike Galbraith <[email protected]>
--- linux-2.6.19-rc5/fs/proc/Makefile.org 2006-11-09 13:08:17.000000000 +0100
+++ linux-2.6.19-rc5/fs/proc/Makefile 2006-11-09 13:09:06.000000000 +0100
@@ -8,8 +8,9 @@ proc-y := nommu.o task_nommu.o
proc-$(CONFIG_MMU) := mmu.o task_mmu.o
proc-y += inode.o root.o base.o generic.o array.o \
- kmsg.o proc_tty.o proc_misc.o
+ proc_tty.o proc_misc.o
proc-$(CONFIG_PROC_KCORE) += kcore.o
proc-$(CONFIG_PROC_VMCORE) += vmcore.o
proc-$(CONFIG_PROC_DEVICETREE) += proc_devtree.o
+proc-$(CONFIG_PRINTK) += kmsg.o
--- linux-2.6.19-rc5/fs/proc/proc_misc.c.org 2006-11-09 13:04:50.000000000 +0100
+++ linux-2.6.19-rc5/fs/proc/proc_misc.c 2006-11-09 13:06:29.000000000 +0100
@@ -696,9 +696,11 @@ void __init proc_misc_init(void)
proc_symlink("mounts", NULL, "self/mounts");
/* And now for trickier ones */
+#ifdef CONFIG_PRINTK
entry = create_proc_entry("kmsg", S_IRUSR, &proc_root);
if (entry)
entry->proc_fops = &proc_kmsg_operations;
+#endif
create_seq_entry("devices", 0, &proc_devinfo_operations);
create_seq_entry("cpuinfo", 0, &proc_cpuinfo_operations);
#ifdef CONFIG_BLOCK
--- linux-2.6.19-rc5/kernel/printk.c.org 2006-11-08 07:44:27.000000000 +0100
+++ linux-2.6.19-rc5/kernel/printk.c 2006-11-11 06:44:59.000000000 +0100
@@ -631,12 +631,7 @@ EXPORT_SYMBOL(vprintk);
asmlinkage long sys_syslog(int type, char __user *buf, int len)
{
- return 0;
-}
-
-int do_syslog(int type, char __user *buf, int len)
-{
- return 0;
+ return -ENOSYS;
}
static void call_console_drivers(unsigned long start, unsigned long end)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]