lkml.org 
[lkml]   [2000]   [Mar]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] sysctl braindamage
Date
The sysctl internal interface is horrible: if you don't #if
CONFIG_SYSCTL everywhere (yuk), you get much bloat, and *worse*,
register_sysctl_table() always "fails".

Lucky hardly anyone checks error returns anyway, eh?

Rusty.
--- linux-2.3.99-pre2-3/kernel/sysctl.c.~1~ Fri Mar 17 14:15:45 2000
+++ linux-2.3.99-pre2-3/kernel/sysctl.c Sun Mar 19 12:59:14 2000
@@ -1348,7 +1348,8 @@
struct ctl_table_header * register_sysctl_table(ctl_table * table,
int insert_at_head)
{
- return 0;
+ /* NULL would mean failure. */
+ return (struct ctl_table_header *)1;
}

void unregister_sysctl_table(struct ctl_table_header * table)
--
Hacking time.

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

\
 
 \ /
  Last update: 2005-03-22 13:57    [W:2.191 / U:0.388 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site