-The output of the command (shown above) is telling me that the sysfs path to start at is <i>/sys/block/sda</i>. I would now run "udevinfo -a -p /sys/block/sda". These two commands can be stringed together, like so:
-
-<blockquote><pre># udevinfo -a -p `udevinfo -q path -n /dev/sda`</pre></blockquote>
-
-Moving on to rule-writing, some snipped output of the results of my "udevinfo -a -p /sys/block/sda" command is shown below, with colour added.<br />
-
-<pre><font color="#003300">
-follow the class device's "device"
- looking at the device chain at '/sys/devices/pci0000:00/0000:00:02.1/usb3/3-3/3-3:1.0/host0/0:0:0:0':
- BUS="scsi"
- ID="0:0:0:0"
- SYSFS{detach_state}="0"
- SYSFS{type}="0"
- SYSFS{max_sectors}="240"
- SYSFS{device_blocked}="0"
- SYSFS{queue_depth}="1"
- SYSFS{scsi_level}="3"
- SYSFS{vendor}=" "
- SYSFS{model}="USB 2.0M DSC "
- SYSFS{rev}="1.00"
- SYSFS{online}="1"</font>
-<font color="#0000FF">
- looking at the device chain at '/sys/devices/pci0000:00/0000:00:02.1/usb3/3-3':
- BUS="usb"
- ID="3-3"
- SYSFS{detach_state}="0"
- SYSFS{bNumInterfaces}=" 1"
- SYSFS{bConfigurationValue}="1"
- SYSFS{bmAttributes}="c0"
- SYSFS{bMaxPower}=" 0mA"
- SYSFS{idVendor}="052b"
- SYSFS{idProduct}="1514"
- SYSFS{bcdDevice}="0100"
- SYSFS{bDeviceClass}="00"
- SYSFS{bDeviceSubClass}="00"
- SYSFS{bDeviceProtocol}="00"
- SYSFS{bNumConfigurations}="1"
- SYSFS{speed}="12"
- SYSFS{manufacturer}="Tekom Technologies, Inc"
- SYSFS{product}="USB 2.0M DSC"</font>
-</pre>
-
-The <i>udevinfo</i> tool provides a lot of information which you can simply copy-paste as udev rules. The reason that I have colour coded the above output is to point out that <b>you generally cannot mix and match information from different parts of the udevinfo output</b>. In the above output, I could not combine information from the different coloured sections - this is because each section of output refers to a different directory in SYSFS. For example, the following rule would not work:
-<blockquote><pre><font color="#003300">BUS="scsi"</font>, <font color="#0000FF">SYSFS{manufacturer}="Tekom Technologies, Inc"</font>, NAME="%k"</pre></blockquote>
-This rule would not work because I am combining information found in the section beginning with BUS="scsi" (green) with information only found in the blue section. The rule would work if I used BUS="usb", sticking only to information found in the blue section above.<br /><br />
-
-You will notice that a lot of information is not relevant for writing basic rules (there is so much of it!), you should generally be looking for information that you recognise and know will not change (e.g. model name).<br /><br />
-
-<b>Note that if you write your own rule to identify a device, the default devfs-style rules will not take effect!</b> It is usually sensible to use NAME="%k" and specify your own extra names in the SYMLINK parameter so that you do not lose the default sensible names.<br /><br />
-
-I will show three examples of this <i>rule writing based on udevinfo output</i> process below. I will then attempt to list some device-dependant tips and tricks for locating the correct info.<br /><br />
-
-<font size=2>A reader wrote to me and informed me that he found KDE's control centre useful for writing rules. Apparently, information about USB devices (and others) can be found in the "Info Centre" section of the KDE Control Centre. This interface shows information such as serial number, vendor ID, etc. If you prefer a GUI-like approach, you might want to investigate this.<br /><br />
-
-The current releases of gnome-volume-manager are unable to treat symlink-nodes as real devices. Conversely as described above, you may wish to specify your own naming in the <i>NAME</i> parameter and specify %k in the <i>SYMLINK</i> parameter.<br /><br />
-
-The behaviour of your own rules masking the defaults can be overcome if you write <a href="#multiple-symlinks">multiple-SYMLINK style rules</a>.
-
-</font>