On 05/24/10 19:16, Felix Feng wrote:
On 05/25/10 01:24, Antonello Cruz wrote:
On 05/22/10 09:35 AM, Felix Feng wrote:
于 2010-5-22 00:19, Garrett D'Amore 写�:
Does it make sense to use some special value (zero or -1) to mean
uninitialized? That way could at least preserve the type.
But the special value is invalid for keyboard configurations. If it is
set in keyboard properties, users may get confused. So I prefer 'null'
to mean uninitialized. Thanks.
This is a valid point. However, if I understood correctly, these are
values set in the SMF manifest. You can have comments in the manifest
explaining the uninitialized value. Moreover, you can leverage SMF
templates to validate the values, but if you use astring, you cannot
validate ranges.

I don't understand why a missing value in the SMF repository can not
be inferred as uninitialized. Could you please elaborate that?
Hi Antonello,

In fact, in this case I've already used missing value(null, value='') to
mean uninitialized. You can see reference [2] in the PSARC material for
details. For the data type, it seems a missing value is invalid for
'count' type. And for 'integer' type, a missing value is treated as 0.
So I use astring to store the values. When users configure keyboard
using system/keymap service, kbd will be called to validate the
values(ranges) and set the values into kernel. Thanks.
The problem here is that you are assuming empty value as missing value, and I was using missing value when I wanted to say missing property. What happens to your code if the property is not in the SMF repository? You should get a SCF_ERROR_NOT_FOUND and I am suggesting that you use that as uninitialized.

Antonello


------
Regards,
Felix
Antonello


_______________________________________________
opensolaris-arc mailing list
[email protected]

Reply via email to