All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Pitt <martin.pitt@ubuntu.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: How to trigger a udev rule
Date: Thu, 03 Mar 2011 08:54:46 +0000	[thread overview]
Message-ID: <20110303085446.GA4723@piware.de> (raw)
In-Reply-To: <1299133287.2394.10.camel@salbei>

[-- Attachment #1: Type: text/plain, Size: 1163 bytes --]

Hello Thomas,

funny that you ask, a few days ago someone asked exactly the same
thing in #udev.

Thomas Bechtold [2011-03-03  7:21 +0100]:
> ### only check /dev/ttyS1 (atmel_usart.1) for modem ###
> ACTION!="add|change", GOTO="mm_platform_device_whitelist_end"
> SUBSYSTEM!="platform", GOTO="mm_platform_device_whitelist_end"
> DRIVERS=="atmel_usart",KERNELS=="atmel_usart.1",ENV{ID_MM_PLATFORM_DRIVER_PROBE}="1"
> LABEL="mm_platform_device_whitelist_end"

I'm afraid udevadm trigger doesn't support the same parental matching
as udev rules themselves do, so I don't think there can be a precise
trigger unless you already know the corresponding /dev/ttySn device
node. If you do, then just do

  udevadm trigger --sysname-match=ttySn

If you dont, it shouldn't matter much to trigger all ttyS devices:

  udevadm trigger --sysname-match=ttyS*

BTW, you can also try with --verbose --dry-run (also works as user) to
see what it would do, and refine the match until it works to your
needs.

Martin
-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  parent reply	other threads:[~2011-03-03  8:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-03  6:21 How to trigger a udev rule Thomas Bechtold
2011-03-03  6:36 ` Andrey Borzenkov
2011-03-03  6:49 ` J. Bakshi
2011-03-03  8:54 ` Martin Pitt [this message]
2011-03-03  9:52 ` Thomas Bechtold
2011-03-03 10:39 ` Andrey Borzenkov

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=20110303085446.GA4723@piware.de \
    --to=martin.pitt@ubuntu.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.