Subject: Re: Device Properties: The Next Generation
To: None <email@example.com, firstname.lastname@example.org>
From: None <email@example.com>
Date: 02/16/2001 16:31:18
matthew green <firstname.lastname@example.org> writes:
> Everything else could use them as bytes.
> i can see the "need" for two types, then: string & binary data.
how about a third:
string pointer. (it's read like a string, but instead of being stored
in the property it's a ptr off to a string constant presumably
embedded in text someplace.)
The notion being, if you've got a 20 byte device name string if your
driver, no point in replicating that in N properties too...
O.K. We can add two flags: PROP_STRING and PROP_CONST_STRING for
strings that are passed in to dev_setprop(). PROP_CONST_STRING
properties would be indistinguishable from PROP_STRING properties
except the data is stored outside the property structure. The
string is still copied into a buffer on retrieval.
Actually, type information is only useful to userland device
tree grovellers, and those could have the type information
hardwired for particular properties. They would only need
the PROP_STRING or PROP_CONST_STRING information if the
property is not standard.