[lkml]   [2000]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] sysctl braindamage

On Sun, Mar 19, 2000 at 02:20:56PM +1100, Rusty Russell wrote:
> 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".

Yes. Returning a null table if you try to register one is obviously the
correct thing to do: the caller can then avoid trying to dereference the
table if we aren't running with CONFIG_SYSCTL.

> + /* NULL would mean failure. */
> + return (struct ctl_table_header *)1;

Eek, that looks _much_ worse! The caller has no idea that this isn't a
valid pointer.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

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