[PATCH 3/4] add rtas_service_present() helper
Nathan Lynch
ntl at pobox.com
Thu Dec 7 14:25:23 EST 2006
Michael Ellerman wrote:
> On Wed, 2006-12-06 at 18:50 -0600, Nathan Lynch wrote:
> > To test for the existence of an RTAS function, we typically do:
> >
> > foo_token = rtas_token("foo");
> > if (foo_token == RTAS_UNKNOWN_SERVICE)
> > return;
> >
> > Add a rtas_service_present method, which provides a more conventional
> > boolean interface for testing the existence of an RTAS method.
>
>
> I like it a lot ..
>
> But should it be called rtas_token_present() ? :D
I considered that, but thought my name was a little more descriptive
-- a token is merely an integer value, but we're really interested in
whether the service named is available.
I don't really care that much either way, though :)
More information about the Linuxppc-dev
mailing list