Subject: Re: devprop bogosity
To: Garrett D'Amore <garrett_damore@tadpole.com>
From: Jason Thorpe <thorpej@shagadelic.org>
List: tech-kern
Date: 05/03/2006 06:48:58
On May 2, 2006, at 1:01 PM, Garrett D'Amore wrote:
> I've noticed something that I consider to be poor form.
Me too. In the next day or so, all of the old subr_prop.c stuff is
going away completely. In the new world, you'll do:
obj = prop_dictionary_get(device_properties(dev), "videomode");
if (obj != NULL) {
/* access the data in obj */
}
In the new world order, if you want to test for "existing and non-
empty", that depends on what kind of property object it is... if a
string:
if (obj != NULL && prop_string_size(obj) != 0)
/* ... */
Anyway, it will all be clear in a day or two.
-- thorpej