Does it make sense to use some special value (zero or -1) to mean uninitialized? That way could at least preserve the type.
-- Garrett Felix Feng <[email protected]> wrote: >> I think this is a good change. But I'd like to see more sample values >> for the valid values of these properties -- the type of astring is a >> bit .. hmm... non-specific. (And furthermore, perhaps some of the >> values should actually take more specifically typed data, e.g. numbers >> or booleans? >Hi Garrett and Liane, > >The properties in system/keymap come from the file - /etc/default/kbd. >The file - /etc/default/kbd is to give users an interface to change >keyboard configurations. Currently /etc/default/kbd provides no default >value for keyboard configurations. The default keyboard configurations >are set by kernel drivers or modules. For example, keyboard repeat rate >and delay is set in kbtrans module. So I set null to the values of these >properties. And for some properties(repeat rate and beeper frequency), >their values are integer. But if I use 'integer' type to store these >properties, I need to set default values for them(null is invalid). So I >store the values of these properties as 'astring' type. The values of >these properties will be checked, when users configure keyboard using >system/keymap service. Thanks. > >------ >Regards, >Felix >> >> Thanks. >> >> - Garrett >> >> On 05/20/10 01:08 AM, Frank Che wrote: >>> I'm sponsoring this case for Felix Feng. It is to convert keyboard >>> configurations supported by /etc/default/kbd to be properties of the >>> system/keymap service, and obsolete that file. The release binding is >>> minor. Timer is set to 05/27/2010. >>> >>> -Frank >>> >>> Background >>> ========== >>> Currently the keyboard configurations (layout, keyclick, beeper >>> frequency etc) >>> are stored in file /etc/default/kbd. >>> >>> During installation, the sysidkbd (PSARC/2006/390) will get the keyboard >>> configurations (so far only keyboard layout) and save the >>> configurations into >>> eeprom(1M) or /etc/default/kbd according to platform. When system >>> boots up, >>> service svc:/system/keymap:default will set the saved keyboard >>> configurations into kernel. >>> >>> Users can modify file /etc/default/kbd to change kernel keyboard >>> configurations. >>> >>> >>> Requirement >>> =========== >>> For Solaris Next, there will be some system configuration changes for >>> the >>> install process. New installer will use SMF profile to customize >>> keyboard configurations. Keyboard configurations will be stored in >>> SMF service properties. And sysidkbd will be removed. So the content of >>> legacy keyboard configuration file - /etc/default/kbd should be moved >>> to be >>> properties of system/keymap service. See [1] for example of SMF profile >>> which would serve for keyboard configuration. >>> >>> >>> Proposal >>> ======== >>> >>> 1. Export keyboard configurations from /etc/default/kbd and import >>> them to >>> properties of svc:/system/keymap:default - see [2] for keyboard service >>> properties. >>> >>> 2. Obsolete file /etc/default/kbd. This file will no longer exist in >>> the system >>> >>> 3. Modify existing /etc/default/kbd consumers, so that they operate >>> on SMF >>> property instead of the file. The following consumer was found in ON >>> gate >>> >>> kbd(1) - usr/src/cmd/kbd/kbd.c >>> >>> For this consumer, file /etc/default/kbd is only referred in this >>> usage: >>> kbd -i [-d keyboard device] >>> >>> This project will update the implementation of 'kbd -i' so that >>> it will not read file /etc/default/kbd, but get keyboard configuration >>> values directly from the keymap service. The man page for kbd will >>> also be updated. See [3] for kbd(1) related PSARC cases. >>> >>> >>> Exported Interfaces >>> =================== >>> >>> Name Commitment Comments >>> ----------------------------------------------------------------------- >>> keymap Committed keyboard configuration >>> SMF property group >>> >>> keymap.KEYBOARD_ABORT >>> keymap.KEYCLICK >>> keymap.REPEAT_DELAY >>> keymap.REPEAT_RATE >>> keymap.LAYOUT >>> keymap.KBD_BEEPER_FREQ >>> keymap.CONSOLE_BEEPER_FREQ >>> >>> >>> References >>> ========== >>> >>> [1] Example of SMF profile configuring keyboard properties >>> >>> <service_bundle type='profile' name='default'> >>> <service name='system/keymap' version='1' type='service'> >>> <instance name='default' enabled='true'> >>> <property_group name='keyboard-0' type='application'> >>> <propval name='layout' type='astring' >>> value='US-English' /> >>> </property_group> >>> </instance> >>> </service> >>> </service_bundle> >>> >>> >>> [2] keyboard properties in svc:/system/keymap:default >>> >>> <property_group name='keymap' type='system'> >>> <propval name='KEYBOARD_ABORT' type='astring' value='' /> >>> <propval name='KEYCLICK' type='astring' value='' /> >>> <propval name='REPEAT_DELAY' type='astring' value='' /> >>> <propval name='REPEAT_RATE' type='astring' value='' /> >>> <propval name='LAYOUT' type='astring' value='' /> >>> <propval name='KBD_BEEPER_FREQ' type='astring' value='' /> >>> <propval name='CONSOLE_BEEPER_FREQ' type='astring' value='' /> >>> </property_group> >>> >>> [3] kbd(1) related PSARC cases >>> >>> PSARC/2002/771 - Layout option to "kbd" >>> PSARC/2005/535 - zero-CountryCode keyboard layout support in kernel >>> PSARC/2008/193 - kbd -s output change from "Taiwanese" to >>> "Traditional-Chinese" >>> >>> >>> >> > _______________________________________________ opensolaris-arc mailing list [email protected]
