linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: dark_mail@gmx.net
To: linux-hotplug@vger.kernel.org
Subject: invalid SUBSYSTEMS operation in rules.d file
Date: Wed, 17 Jan 2007 00:34:18 +0000	[thread overview]
Message-ID: <45AD6F0A.6030100@gmx.net> (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
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

             reply	other threads:[~2007-01-17  0:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-17  0:34 dark_mail [this message]
2007-01-17  0:41 ` invalid SUBSYSTEMS operation in rules.d file dark_mail
2007-01-17  9:29 ` Kay Sievers
2007-01-17 20:57 ` dark_mail

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=45AD6F0A.6030100@gmx.net \
    --to=dark_mail@gmx.net \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).