Replacement for hal-setup-keymap
Kay Sievers
kay.sievers at vrfy.org
Thu May 7 07:39:09 PDT 2009
On Thu, May 7, 2009 at 15:58, Martin Pitt <martin.pitt at ubuntu.com> wrote:
> Kay Sievers [2009-05-07 13:50 +0200]:
>> Only if you do ="[Cc][Aa][Ss][Ee]". :)
>
> Oh, *headdesk*, indeed. Since I'm generating them mostly
> automatically, that shouldn't be a problem. Looks weird, but works.
Hehe, good.
> Would it be too evil to have another operator ==i for case insensitive
> string glob matching? Or perhaps =i=, to disambiguate it when using
> the right-hand side without quotes?
>
> Another option would be regexec(3): FOO==/bar/i.
Yeah, Scott mentioned that, and ATTR{foo}~="/bar/i" might be good.
> Adding regexes will
> add a lot of power, but of course it introduces quite some performance
> penalty and shouldn't be used too much.
Yeah, we need to get numbers here, I think before we would offer that.
The string matches are a real expensive part at coldplug time at
least.
And if you look at things like this:
wc -l /etc/udev/rules.d/*sane*
1647 /etc/udev/rules.d/55-libsane.rules
293 /etc/udev/rules.d/56-sane-backends-autoconfig.rules
1940 total
We really should make sure, that nobody starts something like this
with "nice" regexs. :)
> Was there a previous use case
> for regexes so far?
Not that I know, it might be nice to have, but we limited it to
fnmatch() for a reason so far. So, I don't know now. :)
Thanks,
Kay
More information about the devkit-devel
mailing list