Tux's lil' helper
Joined: 13 Apr 2005
|Posted: Fri Dec 15, 2006 1:43 pm Post subject: what is the syntax for usb_id
|With udev103, the generation of unique names for usb storage devices is left to a tool IMPORT(program)="usb_id -x"
I want to adapt the rules and add a RUN=somescript.sh command. However, this script ought to know for what stick it is called and therefore could use the output of usb_id -x.
However, the program has no man page, and no usage output. When I try to call it as 'usb_id -x', I get the output 'no device specified'. When I try
usb_id -x /dev/sda
I get no output
I tried the same with several keys from teh /sys/class/usb hierarchy with no luck.
So, can anyone tell me what the syntax is for calling usb_id ?
How does udev pass its parameters to usb_id ? I don't see a rule "usb_id -x %k", so maybe it is done through environment variables - which ones ?
How does udev get the output from usb_id ? I presume it outputs something on stdout on valid input, but up to now, I have not yet seen that output.
What is the meaning of the -x options, and are ther more options ?
Using google, I found no information on the usage of usb_id, except for examples like the rule in gentoo.