tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: sysctl to disable protocol stack



    Date:        Wed, 9 Dec 2009 11:20:00 -0500 (EST)
    From:        der Mouse <mouse%Rodents-Montreal.ORG@localhost>
    Message-ID:  <200912091632.LAA04943%Sparkle.Rodents-Montreal.ORG@localhost>

  | I doubt it does, but I sure thought it had set and get handlers,

Didn't know that one - just copied what was there, and it worked...

  | Even in that case, though, I think it might be worth thinking about
  | making the other interfaces (other than the domain struct and the
  | sysctl interface, that is) be "enabled" style.

You mean you'd prefer the code read

        if (!dom_enabled(...))
                goto drop;

rather than

        if (dom_disabled(...))
                goto drop;

That I could do easily enough, but I'm not really sure I see the
difference.   But if that's what is generally preferred, that's
a truly trivial change (to change just that code style, and nothing else.)

I don't really really want to do

        if (dom_enabled(...)) {
                /* shift right existing code */
        }
  drop:

because some of the insertion points just don't fit that model - in almost
all cases though, the appropriate logic, is "if the domain doesn't exist,
then do the error path".

kre



Home | Main Index | Thread Index | Old Index