Skip to contentSkip to conversation

invalid SUBSYSTEMS operation in rules.d file

DISCUSSION [email protected] 2 participants 4 messages Jan 17, 2007

lore
Share & tools
lore
#0 lore raw

I'm using uudev 103 on a gentoo system with a 2.6.19 kernel.

I want my system to automatically create a device node for my usbstick, with two partitions.

So I created the following 06-usbsticks.rules file:

[code]
#BUS="usb", KERNEL="sd*", SYSFS{serial}="0000000000077D", NAME="%k", SYMLINK="blackstick%n", GROUP="users"

BUS="usb", KERNEL="sd*", SYSFS{serial}="L82020506180008560", NAME="%k", NAME="printer%n", GROUP="users"

DRIVERS="usb", ATTRS{serial}="0000000000077D", ATTRS{product}="USB Mass Storage Device", NAME="blackstick%n", GROUP="users", OPTIONS="last_rule"
[/code]

The first line (actually they are three lines, separated by an empty line) is the old rule I used that didn't worl after an upgrade of udev. The second one is meant for the cardreader within my printer, and the last rule is supposed to create a device node /dev/blackstick" when the stick is inserted, along with two nodes for the actual partitions. I had
an additional key SUBSYSTEMS="usb", but it gave me the following
error upon start of udev:

udevd[457]: add_to_rules: invalid SUBSYSTEMS operation udevd[457]: add_to_rules: invalid rule '/etc/udev/rules.d/06-usbsticks.rules:3'

But even when this key is removed udev complains, and of course doesn't create the appropriate device node.

"udevinfo -a -p /sys/block/sda"

returns:
[code]
Udevinfo starts with the device specified by the devpath and then walks up the chain of parent devices. It prints for every device found, all possible attributes in the udev rules key format. A rule to match, can be composed by the attributes of the device and the attributes from one single parent device.

looking at device '/block/sda':

    KERNEL="sda"
    SUBSYSTEM="block"
    DRIVER=""
    ATTR{stat}="       1        0        8       72        0        0
      0        0        0       72       72"
    ATTR{size}="4096000"
    ATTR{removable}="1"
    ATTR{range}="16"
    ATTR{dev}="8:0"

looking at parent device
'/devices/pci0000:00/0000:00:02.3/usb2/2-2/2-2:1.0/host0/target0:0:0/0:0:0:0':

    KERNELS="0:0:0:0"
    SUBSYSTEMS="scsi"
    DRIVERS="sd"
    ATTRS{ioerr_cnt}="0x0"
    ATTRS{iodone_cnt}="0x9"
    ATTRS{iorequest_cnt}="0x9"
    ATTRS{iocounterbits}="32"
    ATTRS{timeout}="30"
    ATTRS{state}="running"
    ATTRS{rev}="0.00"
    ATTRS{model}="2006-06-22      "
    ATTRS{vendor}="TinyDisk"
    ATTRS{scsi_level}="3"
    ATTRS{type}="0"
    ATTRS{queue_type}="none"
    ATTRS{queue_depth}="1"
    ATTRS{device_blocked}="0"
    ATTRS{max_sectors}="240"

looking at parent device
'/devices/pci0000:00/0000:00:02.3/usb2/2-2/2-2:1.0/host0/target0:0:0':

    KERNELS="target0:0:0"
    SUBSYSTEMS=""
    DRIVERS=""

looking at parent device
'/devices/pci0000:00/0000:00:02.3/usb2/2-2/2-2:1.0/host0':

    KERNELS="host0"
    SUBSYSTEMS=""
    DRIVERS=""

looking at parent device
'/devices/pci0000:00/0000:00:02.3/usb2/2-2/2-2:1.0':

    KERNELS="2-2:1.0"
    SUBSYSTEMS="usb"
    DRIVERS="usb-storage"
    ATTRS{modalias}="usb:v0457p0151d0100dc00dsc00dp00ic08isc06ip50"
    ATTRS{bInterfaceProtocol}="50"
    ATTRS{bInterfaceSubClass}="06"
    ATTRS{bInterfaceClass}="08"
    ATTRS{bNumEndpoints}="03"
    ATTRS{bAlternateSetting}=" 0"
    ATTRS{bInterfaceNumber}="00"

looking at parent device '/devices/pci0000:00/0000:00:02.3/usb2/2-2':

    KERNELS="2-2"
    SUBSYSTEMS="usb"
    DRIVERS="usb"
    ATTRS{serial}="0000000000077D"
    ATTRS{product}="USB Mass Storage Device"
    ATTRS{maxchild}="0"
    ATTRS{version}=" 2.00"
    ATTRS{devnum}="2"
    ATTRS{speed}="12"
    ATTRS{bMaxPacketSize0}="64"
    ATTRS{bNumConfigurations}="1"
    ATTRS{bDeviceProtocol}="00"
    ATTRS{bDeviceSubClass}="00"
    ATTRS{bDeviceClass}="00"
    ATTRS{bcdDevice}="0100"
    ATTRS{idProduct}="0151"
    ATTRS{idVendor}="0457"
    ATTRS{bMaxPower}=" 98mA"
    ATTRS{bmAttributes}="80"
    ATTRS{bConfigurationValue}="1"
    ATTRS{bNumInterfaces}=" 1"
    ATTRS{configuration}=""

looking at parent device '/devices/pci0000:00/0000:00:02.3/usb2':

    KERNELS="usb2"
    SUBSYSTEMS="usb"
    DRIVERS="usb"
    ATTRS{serial}="0000:00:02.3"
    ATTRS{product}="OHCI Host Controller"
    ATTRS{manufacturer}="Linux 2.6.19 ohci_hcd"
    ATTRS{maxchild}="3"
    ATTRS{version}=" 1.10"
    ATTRS{devnum}="1"
    ATTRS{speed}="12"
    ATTRS{bMaxPacketSize0}="64"
    ATTRS{bNumConfigurations}="1"
    ATTRS{bDeviceProtocol}="00"
    ATTRS{bDeviceSubClass}="00"
    ATTRS{bDeviceClass}="09"
    ATTRS{bcdDevice}="0206"
    ATTRS{idProduct}="0000"
    ATTRS{idVendor}="0000"
    ATTRS{bMaxPower}="  0mA"
    ATTRS{bmAttributes}="e0"
    ATTRS{bConfigurationValue}="1"
    ATTRS{bNumInterfaces}=" 1"
    ATTRS{configuration}=""

looking at parent device '/devices/pci0000:00/0000:00:02.3':

    KERNELS="0000:00:02.3"
    SUBSYSTEMS="pci"
    DRIVERS="ohci_hcd"
    ATTRS{msi_bus}=""
    ATTRS{broken_parity_status}="0"
    ATTRS{enable}="1"
    ATTRS{modalias}="pci:v00001039d00007001sv00001019sd00000A14bc0Csc03i10"
    ATTRS{local_cpus}="1"
    ATTRS{irq}="11"
    ATTRS{class}="0x0c0310"
    ATTRS{subsystem_device}="0x0a14"
    ATTRS{subsystem_vendor}="0x1019"
    ATTRS{device}="0x7001"
    ATTRS{vendor}="0x1039"

looking at parent device '/devices/pci0000:00':

    KERNELS="pci0000:00"
    SUBSYSTEMS=""
    DRIVERS=""

[/code]

According to the manuals I read so far my rule should work, but somehow it doesn't. Can anybody tell me what's wrong here?

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#1 lore raw

OK, for some reason udev now creates some device nodes, namely blackstick, blackstick00, blackstick01, blackstick1, blackstick2, blackstick82 and blackstick83.
I can mount blackstick1 and blackstick2, but the error message still occurs without any SUBSYSTEMS key being present anywhere in the file.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#2 lore raw
In reply to [email protected]
Quoted 5 lines · On 1/17/07, [email protected] <[email protected]> wrote:

OK, for some reason udev now creates some device nodes, namely blackstick, blackstick00, blackstick01, blackstick1, blackstick2, blackstick82 and blackstick83.
I can mount blackstick1 and blackstick2, but the error message still occurs without any SUBSYSTEMS key being present anywhere in the file.

Replace:
BUS="usb"
with:
BUS="usb"

Kay

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#3 lore raw
In reply to [email protected]
Quoted 7 lines · Kay Sievers
Quoted 5 lines · On 1/17/07, [email protected] <[email protected]> wrote:

OK, for some reason udev now creates some device nodes, namely blackstick, blackstick00, blackstick01, blackstick1, blackstick2, blackstick82 and blackstick83.
I can mount blackstick1 and blackstick2, but the error message still occurs without any SUBSYSTEMS key being present anywhere in the file.

Quoted 7 lines

Replace:
BUS="usb"
with:
BUS="usb"

Kay

OK, works now. (Concentrated on the usbstick rule too much) Thanks! :-)

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel