All of lore.kernel.org
 help / color / mirror / Atom feed
From: Manuel Reimer <Manuel.Spam@nurfuerspam.de>
To: linux-kernel@vger.kernel.org
Subject: udev: Inconsistency between %b and %p?
Date: Thu, 06 Sep 2007 17:33:44 +0200	[thread overview]
Message-ID: <fbp6a3$k6r$1@sea.gmane.org> (raw)

Hello,

I'm trying to write a UDEV rule, which has to hand over the SCSI device 
ID in the format $HOST:$CHANNEL:$ID:$LUN to a shellscript.

My first try was:

ATTR{vendor}=="XXXX", ATTR{model}=="XXXX", SUBSYSTEM=="scsi", 
ACTION=="add", PROGRAM+="/usr/bin/test.sh %b %p"

This returns the SCSI device ID and the device path up to the SCSI 
device to my test script.

As I would prefer to use the USB device information (idVendor, 
idProduct) to detect the device, I also tried this one:

ATTRS{idVendor}=="0dda", ATTRS{idProduct}=="2005", SUBSYSTEM=="scsi", 
ACTION=="add", PROGRAM+="/usr/bin/test.sh %b %p"

Now this version returns the USB device ID ($NUM-$NUM) to the test 
script, but the device path (%p) is still OK and still goes down up to 
the SCSI device ID.

Why does %b not return the SCSI device ID in the second rule?

Thanks in advance

Yours

Manuel


             reply	other threads:[~2007-09-06 15:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-06 15:33 Manuel Reimer [this message]
2007-09-06 15:57 ` udev: Inconsistency between %b and %p? Andreas Schwab
2007-09-06 21:05   ` Manuel Reimer
2007-09-06 21:46     ` Andreas Schwab
2007-09-06 21:59       ` Manuel Reimer
2007-09-07  1:03     ` Kay Sievers
2007-09-11 14:11       ` Manuel Reimer

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='fbp6a3$k6r$1@sea.gmane.org' \
    --to=manuel.spam@nurfuerspam.de \
    --cc=linux-kernel@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.