[PATCH] add new fdi directives
hughsient at gmail.com
Mon Aug 13 00:52:03 PDT 2007
On Fri, 2007-08-10 at 18:56 +0200, Danny Kukawka wrote:
> this patch introduce new fdi-file <match> directives for strings. The new are:
> - string_outof
> - prefix_outof
> - contains_outof
> They all work like the normal directives (string, prefix, contains), but only
> on string properties and match against a ';'-separated list (any other ideas
> for a char as separator?) as in this examples:
> <match key="system.hardware.product" string_outof="foo;bar">
> - matches if "system.hardware.product" is 'foo' or 'bar'
> <match key="system.hardware.product" prefix_outof="foo;bar">
> - matches if "system.hardware.product" starts with 'foo' or 'bar'
> <match key="system.hardware.product" contains_outof="foo;bar">
> - matches if "system.hardware.product" contains the (sub-)string
> 'foo' or 'bar'
We need this IMO.
> This new match directives allow us to reduce the size (and number of
> duplicated rules) of many fdi files in hal and hal-info. See as example a new
> version of fdi/information/10freedesktop/30-keymap-acer.fdi which I reduced
> from 28532 to 8123 bytes (which is ~ -72 %).
Well, in the binary cache this is likely much smaller, but significant
all the same.
I'm not sure string_outof is obvious what it does tho.
More information about the hal