public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* udev: Inconsistency between %b and %p?
@ 2007-09-06 15:33 Manuel Reimer
  2007-09-06 15:57 ` Andreas Schwab
  0 siblings, 1 reply; 7+ messages in thread
From: Manuel Reimer @ 2007-09-06 15:33 UTC (permalink / raw)
  To: linux-kernel

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-09-11 14:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-06 15:33 udev: Inconsistency between %b and %p? Manuel Reimer
2007-09-06 15:57 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox