linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Stezenbach <js@sig21.net>
To: linux-hotplug@vger.kernel.org
Subject: Re: [PATCH] keymap: support for force_release quirk
Date: Mon, 14 Dec 2009 10:28:02 +0000	[thread overview]
Message-ID: <20091214102802.GA4307@sig21.net> (raw)
In-Reply-To: <20091214001219.GA17792@sig21.net>

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

  parent reply	other threads:[~2009-12-14 10:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-14  0:12 [PATCH] keymap: support for force_release quirk Johannes Stezenbach
2009-12-14  9:14 ` Martin Pitt
2009-12-14 10:28 ` Johannes Stezenbach [this message]
2009-12-14 10:34 ` Kay Sievers
2009-12-14 12:37 ` Johannes Stezenbach
2009-12-14 12:45 ` Martin Pitt
2009-12-14 12:50 ` Kay Sievers
2009-12-14 12:55 ` Johannes Stezenbach
2009-12-14 13:32 ` Martin Pitt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091214102802.GA4307@sig21.net \
    --to=js@sig21.net \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).