Subject: Re: Device Properties: The Next Generation
To: Chris G. Demetriou <cgd@sibyte.com>
From: gabriel rosenkoetter <gr@eclipsed.net>
List: tech-kern
Date: 03/05/2001 02:54:49
On Sun, Mar 04, 2001 at 11:21:56PM -0800, Chris G. Demetriou wrote:
> When busses are converted, they'll pass old aux and new props to the
> children.
>
> And, depending on whether the children have been converted, they'll
> fill in either aux (not converted) or property values (converted).
>
> If the print function's going to print out the info, it needs to know
> which it needs to print. The two sets of information are _not_
> interchangable.
I have definitely NOT been following all of this, and perhaps I'm
being dumb here, but if only one of aux and the property struct will
ever be filled by a child, then having the child point the other at
NULL before returning and the print function printing whichever !=
NULL seems like a not entirely unelegant kludge. To me, at least.
Granted, this means minimal conversion even of your "unconverted"
children, but it's considerably less than adding all the conversion
code in (just go add the property struct argument--which you're
going to have to do anyhow, no?--then stick a struct prop = NULL;
before every return from the child's main function).
But, as I said, maybe I'm missing a subtlety here.
~ g r @ eclipsed.net