Subject: Re: Generic Properties
To: None <cgd@broadcom.com, msanders@confusion.net>
From: None <eeh@netbsd.org>
List: tech-kern
Date: 09/27/2001 17:18:34
| How do you know the appropriate size to allocate for val?  It looks
| like you have to call getprop with NULL arguments for val and type,
| allocate storage based on the returned size, then call it again to
| actually populate val and type (but you could have populated type in 
| the first call, too!).
|
| If that's the case, maybe there should be a separate lookup function
| instead of overloading getprop to do both.  

Since it's the same amount of work to locate the property whether or
not you copy the data, why have two separate function signatures if
one will do the job?

Anyway, you quite often know how large a specific property should be
a-priori due to the protocol you are using to pass that property.

Eduardo