[lkml]   [2000]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH] sysctl braindamage
    On Wed, Mar 22, 2000 at 01:09:35PM +1100, Rusty Russell wrote:

    > As it is, it makes it *look like* you can do:
    > ================
    > int init()
    > {
    > my_sysctl = register_sysctl_table(mytable, 0);
    > if (!my_sysctl)
    > return -ENOMEM;
    > return 0;
    > }

    How about ERR_PTR() and IS_ERR()? Same idea as the cast-1-to-pointer method,
    but marginally nicer. Even better, any chance of an API change so you can

    err = register_sysctl_table(mytable, 0, &my_sysctl);


    I've not looked into the code, so I don't know what it is that
    register_sysctl_table returns, but is it the sort of thing that could be
    a pointer to static dummy struct when the main code is disabled?

    "So how do you feel, having given up on coffee?"
    "A bit slow, but you have to expect that on a Monday."
    "It's Thursday."

    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.021 / U:30.224 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site