linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* can we print the attr{} also ?
@ 2010-11-02 12:31 J. Bakshi
  2010-11-02 13:25 ` Martin Pitt
  2010-11-02 15:51 ` J. Bakshi
  0 siblings, 2 replies; 3+ messages in thread
From: J. Bakshi @ 2010-11-02 12:31 UTC (permalink / raw)
  To: linux-hotplug

Hello,

With the help of "udevadm monitor --environment" I can find the following when inserting my usb pendrive

````````````````````````````
ID_VENDOR_ENC=JetFlash
ID_VENDOR_ID\x058f
ID_MODEL=Transcend_8GB
ID_MODEL_ENC=Transcend\x208GB\x20\x20\x20
ID_MODEL_IDc87
ID_REVISION=8.07
ID_SERIAL=JetFlash_Transcend_8GB_MTIKD5C1-0:0
ID_SERIAL_SHORT=MTIKD5C1
````````````````````````

Can I send these information through notify-send ? I have already tried with [  notify-send %d-%k-$attr{ID_VENDOR} ] and the $attr{ID_VENDOR} is blank.  

I have also tried with "udevadm  info -a -p  /sys/block/sdc" and foound

`````````````````
 ATTRS{vendor}="JetFlash"
 ATTRS{model}="Transcend 8GB
```````````````````````

using these as $attr{vendor} also has no effect. 

Could anyone kindly give me a clue please ?
Thanks

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

* Re: can we print the attr{} also ?
  2010-11-02 12:31 can we print the attr{} also ? J. Bakshi
@ 2010-11-02 13:25 ` Martin Pitt
  2010-11-02 15:51 ` J. Bakshi
  1 sibling, 0 replies; 3+ messages in thread
From: Martin Pitt @ 2010-11-02 13:25 UTC (permalink / raw)
  To: linux-hotplug

Hello,

J. Bakshi [2010-11-02 17:49 +0530]:
> Can I send these information through notify-send ? I have already
> tried with [  notify-send %d-%k-$attr{ID_VENDOR} ] and the
> $attr{ID_VENDOR} is blank.  

ID_VENDOR is an udev propery, not a sysfs attribute. Try
$env{ID_VENDOR} instead.

> I have also tried with "udevadm  info -a -p  /sys/block/sdc" and foound
> 
> `````````````````
>  ATTRS{vendor}="JetFlash"
>  ATTRS{model}="Transcend 8GB
> ```````````````````````
> 
> using these as $attr{vendor} also has no effect. 

Presumably the vendor attribute is not on the parent node that you
matched with KERNELS, SUBSYSTEMS, DRIVERS, or ATTRS test? (see man
udev).

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

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

* Re: can we print the attr{} also ?
  2010-11-02 12:31 can we print the attr{} also ? J. Bakshi
  2010-11-02 13:25 ` Martin Pitt
@ 2010-11-02 15:51 ` J. Bakshi
  1 sibling, 0 replies; 3+ messages in thread
From: J. Bakshi @ 2010-11-02 15:51 UTC (permalink / raw)
  To: linux-hotplug

On Tue, 2 Nov 2010 09:25:33 -0400
Martin Pitt <martin.pitt@ubuntu.com> wrote:

> Hello,
> 
> J. Bakshi [2010-11-02 17:49 +0530]:
> > Can I send these information through notify-send ? I have already
> > tried with [  notify-send %d-%k-$attr{ID_VENDOR} ] and the
> > $attr{ID_VENDOR} is blank.  
> 
> ID_VENDOR is an udev propery, not a sysfs attribute. Try
> $env{ID_VENDOR} instead.
> 

You are the hero. Now it is working !!
Many many thanks

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

end of thread, other threads:[~2010-11-02 15:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-02 12:31 can we print the attr{} also ? J. Bakshi
2010-11-02 13:25 ` Martin Pitt
2010-11-02 15:51 ` J. Bakshi

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).