Messages in this thread Patch in this message | | | From | Rusty Russell <> | Subject | [PATCH] sysctl braindamage | Date | Sun, 19 Mar 2000 14:20:56 +1100 |
| |
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/
| |