* [PATCH] Make sysctl vm subdir dependent on CONFIG_MMU
@ 2003-02-17 10:59 Miles Bader
2003-02-17 12:55 ` Christoph Hellwig
0 siblings, 1 reply; 4+ messages in thread
From: Miles Bader @ 2003-02-17 10:59 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linux-kernel
diff -ruN -X../cludes linux-2.5.61-uc0.orig/kernel/sysctl.c linux-2.5.61-uc0/kernel/sysctl.c
--- linux-2.5.61-uc0.orig/kernel/sysctl.c 2002-12-16 12:53:59.000000000 +0900
+++ linux-2.5.61-uc0/kernel/sysctl.c 2003-02-17 19:24:58.000000000 +0900
@@ -111,7 +111,9 @@
{ root_table, LIST_HEAD_INIT(root_table_header.ctl_entry) };
static ctl_table kern_table[];
+#ifdef CONFIG_MMU
static ctl_table vm_table[];
+#endif
#ifdef CONFIG_NET
extern ctl_table net_table[];
#endif
@@ -148,7 +150,9 @@
static ctl_table root_table[] = {
{CTL_KERN, "kernel", NULL, 0, 0555, kern_table},
+#ifdef CONFIG_MMU
{CTL_VM, "vm", NULL, 0, 0555, vm_table},
+#endif
#ifdef CONFIG_NET
{CTL_NET, "net", NULL, 0, 0555, net_table},
#endif
@@ -271,6 +275,7 @@
static int one_hundred = 100;
+#ifdef CONFIG_MMU
static ctl_table vm_table[] = {
{VM_OVERCOMMIT_MEMORY, "overcommit_memory", &sysctl_overcommit_memory,
sizeof(sysctl_overcommit_memory), 0644, NULL, &proc_dointvec},
@@ -321,6 +326,7 @@
NULL, },
{0}
};
+#endif /* CONFIG_MMU */
static ctl_table proc_table[] = {
{0}
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] Make sysctl vm subdir dependent on CONFIG_MMU
2003-02-17 10:59 [PATCH] Make sysctl vm subdir dependent on CONFIG_MMU Miles Bader
@ 2003-02-17 12:55 ` Christoph Hellwig
2003-02-17 14:09 ` Miles Bader
0 siblings, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2003-02-17 12:55 UTC (permalink / raw)
To: Miles Bader; +Cc: Linus Torvalds, linux-kernel
On Mon, Feb 17, 2003 at 07:59:00PM +0900, Miles Bader wrote:
> diff -ruN -X../cludes linux-2.5.61-uc0.orig/kernel/sysctl.c linux-2.5.61-uc0/kernel/sysctl.c
> --- linux-2.5.61-uc0.orig/kernel/sysctl.c 2002-12-16 12:53:59.000000000 +0900
> +++ linux-2.5.61-uc0/kernel/sysctl.c 2003-02-17 19:24:58.000000000 +0900
> @@ -111,7 +111,9 @@
> { root_table, LIST_HEAD_INIT(root_table_header.ctl_entry) };
>
> static ctl_table kern_table[];
> +#ifdef CONFIG_MMU
> static ctl_table vm_table[];
> +#endif
These ifdefs are ugly - please move the whole table into a file that
isn't compiled when CONFIG_MMU isn't set (e.g. memory.c) and use
register_sysctl_table()
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] Make sysctl vm subdir dependent on CONFIG_MMU
2003-02-17 12:55 ` Christoph Hellwig
@ 2003-02-17 14:09 ` Miles Bader
2003-02-17 14:20 ` Christoph Hellwig
0 siblings, 1 reply; 4+ messages in thread
From: Miles Bader @ 2003-02-17 14:09 UTC (permalink / raw)
To: Christoph Hellwig, Linus Torvalds, linux-kernel
On Mon, Feb 17, 2003 at 12:55:04PM +0000, Christoph Hellwig wrote:
> These ifdefs are ugly - please move the whole table into a file that
> isn't compiled when CONFIG_MMU isn't set (e.g. memory.c) and use
> register_sysctl_table()
Hmm, somehow I thought you were going to say that ... :-)
Either way is OK with me, but note that I just followed the style already
used in sysctl.c for CONFIG_NET.
-Miles
--
Saa, shall we dance? (from a dance-class advertisement)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-02-17 14:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-17 10:59 [PATCH] Make sysctl vm subdir dependent on CONFIG_MMU Miles Bader
2003-02-17 12:55 ` Christoph Hellwig
2003-02-17 14:09 ` Miles Bader
2003-02-17 14:20 ` Christoph Hellwig
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.