[PATCH] 2.4.13-ac8: procfs compile fix

Robert Love (rml@tech9.net)
05 Nov 2001 19:02:53 -0500


The kernel fails to compile with procfs enabled and modules disabled.

2.4.13-ac8 adds a fops structure for /proc/ksyms, which is only defined
if CONFIG_MODULES is set. However, the proc entry is still created if
CONFIG_MODULES is not set.

--- linux-2.4.13-ac8/fs/proc/proc_misc.c Mon Nov 5 17:34:08 2001
+++ linux/fs/proc/proc_misc.c Mon Nov 5 18:29:55 2001
@@ -619,9 +619,11 @@
entry = create_proc_entry("mounts", 0, NULL);
if (entry)
entry->proc_fops = &proc_mounts_operations;
+#ifdef CONFIG_MODULES
entry = create_proc_entry("ksyms", 0, NULL);
if (entry)
entry->proc_fops = &proc_ksyms_operations;
+#endif
proc_root_kcore = create_proc_entry("kcore", S_IRUSR, NULL);
if (proc_root_kcore) {
proc_root_kcore->proc_fops = &proc_kcore_operations;

Robert Love

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/