Re: [PATCH] keymap: support for force_release quirk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Martin,

On Mon, Dec 14, 2009 at 10:14:50AM +0100, Martin Pitt wrote:
> 
> A gotcha that I see here is that the force_release only ever gets
> appended to. I. e. whenever we run udevtrigger, we'd append the same
> keys again. POSIX shell doesn't have elaborate substring matching
> capabilities like bash's ${x/pattern/string}, so it might not be too
> easy to check if we already have a key in POSIX sh. (But please don't
> call grep in a loop; let's rather rewrite this bit in C). There might
> be some trickery with splitting by IFS=, into an array or so, if you
> want to keep using sh?

The problem is that force_release is preset by the kernel, so
in order to do what you want we need either
a) pass both old and new key list on "change"
b) save initial force_release value to a file on "add"
   and use the file on "change"

I'm not sure how a) could work on a package upgrade. But b)
sounds simple enough, the question is where to put the file.
How about /dev/.udev/?


Thanks for your other comments, I'll follow up with a new
patch asap.


Johannes
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux