public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* udev LABEL not working: sysfs_path_is_file: stat() failed
@ 2003-12-22  1:00 Scott James Remnant
  2003-12-22  9:23 ` Greg KH
  0 siblings, 1 reply; 7+ messages in thread
From: Scott James Remnant @ 2003-12-22  1:00 UTC (permalink / raw)
  To: linux-kernel


[-- Attachment #1.1: Type: text/plain, Size: 1388 bytes --]

[I am not subscribed to linux-kernel, please Cc: me on replies.]

I'm having a problem getting udev to honour my LABEL lines in
/etc/udev/udev.rules.  At the top of this I've got:

LABEL, BUS="usb", SYSFS_vendor="Fujifilm", SYSFS_model="FinePix 1400Zoom", NAME="camera"

Which as far as I understand it should create a /dev/camera when I plug
in my USB camera...  Except all I ever get is /dev/sdb and /dev/sdb1, no
matter what combinations of SYSFS_* I try.

The most relevant lines I could find look like this:

Dec 22 00:47:17 descent udev[4383]: do_label: look for device attribute 'model'
Dec 22 00:47:17 descent udev[4383]: sysfs_path_is_file: stat() failed

However if I manually look at /sys/block/sdb/device it's all there:

descent scott% cd /sys/block/sdb/device
descent device% ls
block@  detach_state    model   power/       rescan  scsi_level  vendor
delete  device_blocked  online  queue_depth  rev     type
descent device% cat vendor
Fujifilm
descent device% cat model
FinePix 1400Zoom

I'm using udev-009 and hotplug-0.0.20031013-2 on a Debian machine
running Linux 2.6.0.  I've attached a copy of my udev.conf, udev.rules
and the log output from both the kernel when attaching the device and
udev when compiled with DEBUG on.

Scott
-- 
Have you ever, ever felt like this?
Had strange things happen?  Are you going round the twist?


[-- Attachment #1.2: udev.conf --]
[-- Type: text/plain, Size: 726 bytes --]

# udev.conf
# The main config file for udev
#
# This file can be used to override some of udev's default values
# for where it looks for files, and where it places device nodes.


# udev_root - where in the filesystem to place the device nodes
udev_root="/udev/"

# udev_db - The name and location of the udev database.
udev_db="/udev/.udev.tdb"

# udev_rules - The name and location of the udev rules file
udev_rules="/etc/udev/udev.rules"

# udev_permissions - The name and location of the udev permission file
udev_permissions="/etc/udev/udev.permissions"

# default_mode - set the default mode for all nodes that have no 
#                explicit match in the permissions file
default_mode="0600"


[-- Attachment #1.3: udev.rules --]
[-- Type: text/plain, Size: 1794 bytes --]

# There are a number of modifiers that are allowed to be used in
# a number of the different fields. They provide the following subsitutions:
# %n - the "kernel number" of the device.
#      for example, 'sda3' has a "kernel number" of '3'
# %M - the kernel major number for the device
# %m - the kernel minor number for the device
# %b - the bus id for the device
# %c - the return value for the CALLOUT program (note, this doesn't work within
#      the PROGRAM field for the obvious reason.)
# %D - use the devfs style disk name for this device.
#      For partitions, this will result in 'part%n'
#      If this is not a partition, it will result in 'disk'
#

# My camera
LABEL, BUS="usb", SYSFS_vendor="Fujifilm", SYSFS_model="FinePix 1400Zoom", NAME="camera"

# ide block devices
NUMBER, BUS="ide", ID="0.0", NAME="ide/host0/bus0/target0/lun0/%D", SYMLINK="hda%n"
NUMBER, BUS="ide", ID="0.1", NAME="ide/host0/bus0/target1/lun0/%D", SYMLINK="hdb%n"
NUMBER, BUS="ide", ID="1.0", NAME="ide/host0/bus1/target0/lun0/%D", SYMLINK="hdc%n"
NUMBER, BUS="ide", ID="1.1", NAME="ide/host0/bus1/target1/lun0/%D", SYMLINK="hdd%n"

# md block devices
REPLACE, KERNEL="md[0-9]*", NAME="md/%n", SYMLINK="md%n"

# tty devices
REPLACE, KERNEL="tty[0-9]*", NAME="vc/%n"
REPLACE, KERNEL="ttyS[0-9]*", NAME="tts/%n"
REPLACE, KERNEL="ttyUSB[0-9]*", NAME="tts/USB%n"

# vc devices
REPLACE, KERNEL="vcs",        NAME="vcc/0"
REPLACE, KERNEL="vcs[0-9]*",  NAME="vcc/%n"
REPLACE, KERNEL="vcsa",       NAME="vcc/a0"
REPLACE, KERNEL="vcsa[0-9]*", NAME="vcc/a%n"

# v4l devices
REPLACE, KERNEL="video[0-9]*", NAME="v4l/video%n"
REPLACE, KERNEL="radio[0-9]*", NAME="v4l/radio%n"
REPLACE, KERNEL="vbi[0-9]*",   NAME="v4l/vbi%n"
REPLACE, KERNEL="vtx[0-9]*",   NAME="v4l/vtx%n"


[-- Attachment #1.4: udev.log --]
[-- Type: text/plain, Size: 11096 bytes --]

Dec 22 00:47:17 descent kernel: hub 1-2:1.0: new USB device on port 3, assigned address 17
Dec 22 00:47:17 descent usb.agent[4341]: ... no modules for USB product 4cb/100/1000
Dec 22 00:47:17 descent kernel: scsi12 : SCSI emulation for USB Mass Storage devices
Dec 22 00:47:17 descent kernel:   Vendor: Fujifilm  Model: FinePix 1400Zoom  Rev: 1000
Dec 22 00:47:17 descent kernel:   Type:   Direct-Access                      ANSI SCSI revision: 02
Dec 22 00:47:17 descent scsi.agent[4368]: how to add device type= at /devices/pci0000:00/0000:00:02.2/usb1/1-2/1-2.3/1-2.3:1.0/host12/12:0:0:0 ??
Dec 22 00:47:17 descent kernel: SCSI device sdb: 128000 512-byte hdwr sectors (66 MB)
Dec 22 00:47:17 descent kernel: sdb: Write Protect is off
Dec 22 00:47:17 descent kernel:  sdb: sdb1
Dec 22 00:47:17 descent kernel: Attached scsi removable disk sdb at scsi12, channel 0, id 0, lun 0
Dec 22 00:47:17 descent kernel: Attached scsi generic sg1 at scsi12, channel 0, id 0, lun 0,  type 0
Dec 22 00:47:17 descent udev[4358]: main: version 009
Dec 22 00:47:17 descent udev[4358]: main: looking at '/devices/pci0000:00/0000:00:02.2/usb1/1-2/1-2.3/1-2.3:1.0'
Dec 22 00:47:17 descent udev[4358]: main: not a block or class device
Dec 22 00:47:17 descent udev[4366]: main: version 009
Dec 22 00:47:17 descent udev[4366]: main: looking at '/class/scsi_host/host12'
Dec 22 00:47:17 descent udev[4366]: get_dirs: sysfs_path='/sys'
Dec 22 00:47:17 descent udev[4366]: parse_config_file: reading '/etc/udev/udev.conf' as config file
Dec 22 00:47:17 descent udev[4366]: namedev_init_rules: reading '/etc/udev/udev.rules' as rules file
Dec 22 00:47:17 descent udev[4366]: namedev_init_permissions: reading '/etc/udev/udev.permissions' as permissions file
Dec 22 00:47:17 descent udev[4366]: sleep_for_dev: looking for '/sys/class/scsi_host/host12/dev'
Dec 22 00:47:17 descent udev[4377]: main: version 009
Dec 22 00:47:17 descent udev[4377]: main: looking at '/devices/pci0000:00/0000:00:02.2/usb1/1-2/1-2.3/1-2.3:1.0/host12/12:0:0:0'
Dec 22 00:47:17 descent udev[4377]: main: not a block or class device
Dec 22 00:47:17 descent kernel: sdb: Mode Sense: 00 32 02 00
Dec 22 00:47:17 descent udev[4383]: main: version 009
Dec 22 00:47:17 descent udev[4383]: main: looking at '/block/sdb'
Dec 22 00:47:17 descent udev[4383]: get_dirs: sysfs_path='/sys'
Dec 22 00:47:17 descent udev[4383]: parse_config_file: reading '/etc/udev/udev.conf' as config file
Dec 22 00:47:17 descent udev[4383]: namedev_init_rules: reading '/etc/udev/udev.rules' as rules file
Dec 22 00:47:17 descent udev[4383]: namedev_init_permissions: reading '/etc/udev/udev.permissions' as permissions file
Dec 22 00:47:17 descent udev[4383]: sleep_for_dev: looking for '/sys/block/sdb/dev'
Dec 22 00:47:17 descent udev[4383]: get_class_dev: looking at '/sys/block/sdb'
Dec 22 00:47:17 descent udev[4383]: get_class_dev: class_dev->name='sdb'
Dec 22 00:47:17 descent udev[4383]: get_major_minor: dev='8:16 '
Dec 22 00:47:17 descent udev[4383]: get_major_minor: found major=8, minor=16
Dec 22 00:47:17 descent udev[4383]: namedev_name_device: looking at block device
Dec 22 00:47:17 descent udev[4383]: namedev_name_device: class_dev->name = 'sdb'
Dec 22 00:47:17 descent udev[4383]: build_kernel_number: kernel_number=''
Dec 22 00:47:17 descent udev[4383]: do_label: look for device attribute 'model'
Dec 22 00:47:17 descent udev[4383]: sysfs_path_is_file: stat() failed
Dec 22 00:47:17 descent udev[4383]: do_replace: compare name 'md[0-9]*' with 'sdb'
Dec 22 00:47:17 descent udev[4383]: do_replace: compare name 'tty[0-9]*' with 'sdb'
Dec 22 00:47:17 descent udev[4383]: do_replace: compare name 'ttyS[0-9]*' with 'sdb'
Dec 22 00:47:17 descent udev[4383]: do_replace: compare name 'ttyUSB[0-9]*' with 'sdb'
Dec 22 00:47:17 descent udev[4383]: do_replace: compare name 'vcs' with 'sdb'
Dec 22 00:47:17 descent udev[4383]: do_replace: compare name 'vcs[0-9]*' with 'sdb'
Dec 22 00:47:17 descent udev[4383]: do_replace: compare name 'vcsa' with 'sdb'
Dec 22 00:47:17 descent udev[4383]: do_replace: compare name 'vcsa[0-9]*' with 'sdb'
Dec 22 00:47:17 descent udev[4383]: do_replace: compare name 'video[0-9]*' with 'sdb'
Dec 22 00:47:17 descent udev[4383]: do_replace: compare name 'radio[0-9]*' with 'sdb'
Dec 22 00:47:17 descent udev[4383]: do_replace: compare name 'vbi[0-9]*' with 'sdb'
Dec 22 00:47:17 descent udev[4383]: do_replace: compare name 'vtx[0-9]*' with 'sdb'
Dec 22 00:47:17 descent udev[4383]: namedev_name_device: name, 'sdb' is going to have owner='root', group='disk', mode = 0660
Dec 22 00:47:17 descent udev[4383]: udev_add_device: name='sdb'
Dec 22 00:47:17 descent udev[4383]: create_node: mknod(/udev/sdb, 060660, 8, 16)Dec 22 00:47:17 descent udev[4383]: create_node: chmod(/udev/sdb, 060660)
Dec 22 00:47:17 descent udev[4383]: create_node: chown(/udev/sdb, 0, 6)
Dec 22 00:47:17 descent udev[4389]: main: version 009
Dec 22 00:47:17 descent udev[4389]: main: looking at '/block/sdb/sdb1'
Dec 22 00:47:17 descent udev[4389]: get_dirs: sysfs_path='/sys'
Dec 22 00:47:17 descent udev[4389]: parse_config_file: reading '/etc/udev/udev.conf' as config file
Dec 22 00:47:17 descent udev[4389]: namedev_init_rules: reading '/etc/udev/udev.rules' as rules file
Dec 22 00:47:17 descent udev[4389]: namedev_init_permissions: reading '/etc/udev/udev.permissions' as permissions file
Dec 22 00:47:17 descent udev[4389]: sleep_for_dev: looking for '/sys/block/sdb/sdb1/dev'
Dec 22 00:47:17 descent udev[4389]: get_class_dev: looking at '/sys/block/sdb/sdb1'
Dec 22 00:47:17 descent udev[4389]: get_class_dev: class_dev->name='sdb1'
Dec 22 00:47:17 descent udev[4389]: get_major_minor: dev='8:17 '
Dec 22 00:47:17 descent udev[4389]: get_major_minor: found major=8, minor=17
Dec 22 00:47:17 descent udev[4389]: namedev_name_device: looking at block deviceDec 22 00:47:17 descent udev[4389]: namedev_name_device: really is a partition
Dec 22 00:47:17 descent udev[4389]: namedev_name_device: class_dev_parent->name='sdb'
Dec 22 00:47:17 descent udev[4389]: sysfs_path_is_link: stat() failed
Dec 22 00:47:17 descent last message repeated 6 times
Dec 22 00:47:17 descent udev[4389]: namedev_name_device: sysfs_device->path='/sys/devices/pci0000:00/0000:00:02.2/usb1/1-2/1-2.3/1-2.3:1.0/host12/12:0:0:0'
Dec 22 00:47:17 descent udev[4389]: namedev_name_device: sysfs_device->bus_id='12:0:0:0'
Dec 22 00:47:17 descent udev[4389]: namedev_name_device: sysfs_device->bus='unknown'
Dec 22 00:47:17 descent udev[4389]: build_kernel_number: kernel_number='1'
Dec 22 00:47:17 descent udev[4389]: do_label: dev->bus='usb' sysfs_device->bus='unknown'
Dec 22 00:47:17 descent udev[4389]: do_number: dev->bus='ide' sysfs_device->bus='unknown'
Dec 22 00:47:17 descent last message repeated 3 times
Dec 22 00:47:17 descent udev[4389]: do_replace: compare name 'md[0-9]*' with 'sdb1'
Dec 22 00:47:17 descent udev[4389]: do_replace: compare name 'tty[0-9]*' with 'sdb1'
Dec 22 00:47:17 descent udev[4389]: do_replace: compare name 'ttyS[0-9]*' with 'sdb1'
Dec 22 00:47:17 descent udev[4389]: do_replace: compare name 'ttyUSB[0-9]*' with 'sdb1'
Dec 22 00:47:17 descent udev[4389]: do_replace: compare name 'vcs' with 'sdb1'
Dec 22 00:47:17 descent udev[4389]: do_replace: compare name 'vcs[0-9]*' with 'sdb1'
Dec 22 00:47:17 descent udev[4389]: do_replace: compare name 'vcsa' with 'sdb1'
Dec 22 00:47:17 descent udev[4389]: do_replace: compare name 'vcsa[0-9]*' with 'sdb1'
Dec 22 00:47:17 descent udev[4389]: do_replace: compare name 'video[0-9]*' with 'sdb1'
Dec 22 00:47:17 descent udev[4389]: do_replace: compare name 'radio[0-9]*' with 'sdb1'
Dec 22 00:47:17 descent udev[4389]: do_replace: compare name 'vbi[0-9]*' with 'sdb1'
Dec 22 00:47:17 descent udev[4389]: do_replace: compare name 'vtx[0-9]*' with 'sdb1'
Dec 22 00:47:17 descent udev[4389]: namedev_name_device: name, 'sdb1' is going to have owner='root', group='disk', mode = 0660
Dec 22 00:47:17 descent udev[4389]: udev_add_device: name='sdb1'
Dec 22 00:47:17 descent udev[4389]: create_node: mknod(/udev/sdb1, 060660, 8, 17)
Dec 22 00:47:17 descent udev[4389]: create_node: chmod(/udev/sdb1, 060660)
Dec 22 00:47:17 descent udev[4389]: create_node: chown(/udev/sdb1, 0, 6)
Dec 22 00:47:17 descent udev[4395]: main: version 009
Dec 22 00:47:17 descent udev[4395]: main: looking at '/class/scsi_device/12:0:0:0'
Dec 22 00:47:17 descent udev[4395]: get_dirs: sysfs_path='/sys'
Dec 22 00:47:17 descent udev[4395]: parse_config_file: reading '/etc/udev/udev.conf' as config file
Dec 22 00:47:17 descent udev[4395]: namedev_init_rules: reading '/etc/udev/udev.rules' as rules file
Dec 22 00:47:17 descent udev[4395]: namedev_init_permissions: reading '/etc/udev/udev.permissions' as permissions file
Dec 22 00:47:17 descent udev[4395]: sleep_for_dev: looking for '/sys/class/scsi_device/12:0:0:0/dev'
Dec 22 00:47:17 descent kernel: WARNING: USB Mass Storage data integrity not assured
Dec 22 00:47:17 descent kernel: USB Mass Storage device found at 17
Dec 22 00:47:18 descent udev[4366]: sleep_for_dev: looking for '/sys/class/scsi_host/host12/dev'
Dec 22 00:47:18 descent udev[4395]: sleep_for_dev: looking for '/sys/class/scsi_device/12:0:0:0/dev'
Dec 22 00:47:19 descent udev[4397]: main: version 009
Dec 22 00:47:19 descent udev[4397]: main: looking at '/devices/pci0000:00/0000:00:02.2/usb1/1-2/1-2.3'
Dec 22 00:47:19 descent udev[4397]: main: not a block or class device
Dec 22 00:47:19 descent udev[4366]: sleep_for_dev: looking for '/sys/class/scsi_host/host12/dev'
Dec 22 00:47:19 descent udev[4395]: sleep_for_dev: looking for '/sys/class/scsi_device/12:0:0:0/dev'
Dec 22 00:47:20 descent udev[4366]: sleep_for_dev: looking for '/sys/class/scsi_host/host12/dev'
Dec 22 00:47:20 descent udev[4395]: sleep_for_dev: looking for '/sys/class/scsi_device/12:0:0:0/dev'
Dec 22 00:47:21 descent udev[4366]: sleep_for_dev: looking for '/sys/class/scsi_host/host12/dev'
Dec 22 00:47:21 descent udev[4395]: sleep_for_dev: looking for '/sys/class/scsi_device/12:0:0:0/dev'
Dec 22 00:47:22 descent udev[4366]: sleep_for_dev: looking for '/sys/class/scsi_host/host12/dev'
Dec 22 00:47:22 descent udev[4395]: sleep_for_dev: looking for '/sys/class/scsi_device/12:0:0:0/dev'
Dec 22 00:47:23 descent udev[4366]: sleep_for_dev: looking for '/sys/class/scsi_host/host12/dev'
Dec 22 00:47:23 descent udev[4395]: sleep_for_dev: looking for '/sys/class/scsi_device/12:0:0:0/dev'
Dec 22 00:47:24 descent udev[4366]: sleep_for_dev: looking for '/sys/class/scsi_host/host12/dev'
Dec 22 00:47:24 descent udev[4395]: sleep_for_dev: looking for '/sys/class/scsi_device/12:0:0:0/dev'
Dec 22 00:47:25 descent udev[4366]: sleep_for_dev: looking for '/sys/class/scsi_host/host12/dev'
Dec 22 00:47:25 descent udev[4395]: sleep_for_dev: looking for '/sys/class/scsi_device/12:0:0:0/dev'
Dec 22 00:47:26 descent udev[4366]: sleep_for_dev: looking for '/sys/class/scsi_host/host12/dev'
Dec 22 00:47:26 descent udev[4395]: sleep_for_dev: looking for '/sys/class/scsi_device/12:0:0:0/dev'
 



[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: udev LABEL not working: sysfs_path_is_file: stat() failed
  2003-12-22  1:00 udev LABEL not working: sysfs_path_is_file: stat() failed Scott James Remnant
@ 2003-12-22  9:23 ` Greg KH
  2003-12-22 10:58   ` Scott James Remnant
  0 siblings, 1 reply; 7+ messages in thread
From: Greg KH @ 2003-12-22  9:23 UTC (permalink / raw)
  To: Scott James Remnant; +Cc: linux-kernel, linux-hotplug-devel

On Mon, Dec 22, 2003 at 01:00:29AM +0000, Scott James Remnant wrote:
> [I am not subscribed to linux-kernel, please Cc: me on replies.]

The linux-hotplug-devel mailing list is best place for questions about
udev, not lkml...

> I'm having a problem getting udev to honour my LABEL lines in
> /etc/udev/udev.rules.  At the top of this I've got:
> 
> LABEL, BUS="usb", SYSFS_vendor="Fujifilm", SYSFS_model="FinePix 1400Zoom", NAME="camera"

Try changing BUS="usb" to BUS="scsi".  Also make sure that the model
file doesn't contain any trailing spaces.  That's a very common thing on
usb devices.

And you are trying to match up 2 files, right now udev only supports 1,
so the last one (model) is used.  The vendor rule there is ignored.

There is also a problem with udev beating the kernel.  It can easily get
the hotplug event before the kernel has created the sysfs file.  I'm
currently working on fixing this in udev, should have it done by the
next release.  You can tell if you are seeing this race by just running
the test.block script in the test directory in udev.  If your device
node is created properly with that script, but not when you plug the
device in, you have that problem.

And people tried to tell us that the hotplug interface was slow without
ever testing it out...

Hope this helps,

greg k-h

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

* Re: udev LABEL not working: sysfs_path_is_file: stat() failed
  2003-12-22  9:23 ` Greg KH
@ 2003-12-22 10:58   ` Scott James Remnant
  2003-12-22 20:40     ` Greg KH
  0 siblings, 1 reply; 7+ messages in thread
From: Scott James Remnant @ 2003-12-22 10:58 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-kernel, linux-hotplug-devel

[-- Attachment #1: Type: text/plain, Size: 1452 bytes --]

[I am not subscribed to linux-kernel or linux-hotplug-devel, please Cc:
me on replies.]

On Mon, 2003-12-22 at 09:23, Greg KH wrote:

> On Mon, Dec 22, 2003 at 01:00:29AM +0000, Scott James Remnant wrote:
> 
> > I'm having a problem getting udev to honour my LABEL lines
> 
> There is also a problem with udev beating the kernel.  It can easily get
> the hotplug event before the kernel has created the sysfs file.  I'm
> currently working on fixing this in udev, should have it done by the
> next release.  You can tell if you are seeing this race by just running
> the test.block script in the test directory in udev.  If your device
> node is created properly with that script, but not when you plug the
> device in, you have that problem.
> 
> And people tried to tell us that the hotplug interface was slow without
> ever testing it out...
> 
It looks like this is what's happening, after tracing the code I added
some stuff to print out everything in the sysfs directory at the time
udev was running, and it is devoid of the vendor & model files which
turn up shortly afterwards.

On the slower laptop, it works as expected.


One question though, it only ever seems to create a device for the
actual usb-storage disk and not the partition.  Is there some magic to
create the partition device instead?

Scott
-- 
Have you ever, ever felt like this?
Had strange things happen?  Are you going round the twist?


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: udev LABEL not working: sysfs_path_is_file: stat() failed
  2003-12-22 10:58   ` Scott James Remnant
@ 2003-12-22 20:40     ` Greg KH
  2003-12-23  7:29       ` Scott James Remnant
  0 siblings, 1 reply; 7+ messages in thread
From: Greg KH @ 2003-12-22 20:40 UTC (permalink / raw)
  To: Scott James Remnant; +Cc: linux-kernel, linux-hotplug-devel

On Mon, Dec 22, 2003 at 10:58:45AM +0000, Scott James Remnant wrote:
> One question though, it only ever seems to create a device for the
> actual usb-storage disk and not the partition.  Is there some magic to
> create the partition device instead?

Do you have a partition show up in /sys/block?  If not, then udev will
not create it.  It works here for my usb-storage devices that have
partitions on them.

thanks,

greg k-h

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

* Re: udev LABEL not working: sysfs_path_is_file: stat() failed
  2003-12-22 20:40     ` Greg KH
@ 2003-12-23  7:29       ` Scott James Remnant
  2003-12-23 22:13         ` Greg KH
  0 siblings, 1 reply; 7+ messages in thread
From: Scott James Remnant @ 2003-12-23  7:29 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-kernel, linux-hotplug-devel

[-- Attachment #1: Type: text/plain, Size: 718 bytes --]

On Mon, 2003-12-22 at 20:40, Greg KH wrote:

> On Mon, Dec 22, 2003 at 10:58:45AM +0000, Scott James Remnant wrote:
> > One question though, it only ever seems to create a device for the
> > actual usb-storage disk and not the partition.  Is there some magic to
> > create the partition device instead?
> 
> Do you have a partition show up in /sys/block?  If not, then udev will
> not create it.  It works here for my usb-storage devices that have
> partitions on them.
> 
Yes, /dev/block/sdb/sdb1 certainly does appear, as does /udev/sdb1 --
the LABEL rule only seems to match "sdb" though.

Scott
-- 
Have you ever, ever felt like this?
Had strange things happen?  Are you going round the twist?


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: udev LABEL not working: sysfs_path_is_file: stat() failed
  2003-12-23  7:29       ` Scott James Remnant
@ 2003-12-23 22:13         ` Greg KH
  2003-12-28  9:11           ` Scott James Remnant
  0 siblings, 1 reply; 7+ messages in thread
From: Greg KH @ 2003-12-23 22:13 UTC (permalink / raw)
  To: Scott James Remnant; +Cc: linux-kernel, linux-hotplug-devel

On Tue, Dec 23, 2003 at 07:29:07AM +0000, Scott James Remnant wrote:
> On Mon, 2003-12-22 at 20:40, Greg KH wrote:
> 
> > On Mon, Dec 22, 2003 at 10:58:45AM +0000, Scott James Remnant wrote:
> > > One question though, it only ever seems to create a device for the
> > > actual usb-storage disk and not the partition.  Is there some magic to
> > > create the partition device instead?
> > 
> > Do you have a partition show up in /sys/block?  If not, then udev will
> > not create it.  It works here for my usb-storage devices that have
> > partitions on them.
> > 
> Yes, /dev/block/sdb/sdb1 certainly does appear, as does /udev/sdb1 --
> the LABEL rule only seems to match "sdb" though.

That's odd, what is the rule?  They should both match.

greg k-h

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

* Re: udev LABEL not working: sysfs_path_is_file: stat() failed
  2003-12-23 22:13         ` Greg KH
@ 2003-12-28  9:11           ` Scott James Remnant
  0 siblings, 0 replies; 7+ messages in thread
From: Scott James Remnant @ 2003-12-28  9:11 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-kernel, linux-hotplug-devel

[-- Attachment #1: Type: text/plain, Size: 1072 bytes --]

On Tue, 2003-12-23 at 22:13, Greg KH wrote:

> On Tue, Dec 23, 2003 at 07:29:07AM +0000, Scott James Remnant wrote:
> > On Mon, 2003-12-22 at 20:40, Greg KH wrote:
> > 
> > > On Mon, Dec 22, 2003 at 10:58:45AM +0000, Scott James Remnant wrote:
> > > > One question though, it only ever seems to create a device for the
> > > > actual usb-storage disk and not the partition.  Is there some magic to
> > > > create the partition device instead?
> > > 
> > > Do you have a partition show up in /sys/block?  If not, then udev will
> > > not create it.  It works here for my usb-storage devices that have
> > > partitions on them.
> > > 
> > Yes, /dev/block/sdb/sdb1 certainly does appear, as does /udev/sdb1 --
> > the LABEL rule only seems to match "sdb" though.
> 
> That's odd, what is the rule?  They should both match.
> 
Had omitted the %n in the NAME, so only the disk was showing up. 
udev-011 fixes the original problem too, thanks.

Scott
-- 
Have you ever, ever felt like this?
Had strange things happen?  Are you going round the twist?


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

end of thread, other threads:[~2003-12-28  9:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-22  1:00 udev LABEL not working: sysfs_path_is_file: stat() failed Scott James Remnant
2003-12-22  9:23 ` Greg KH
2003-12-22 10:58   ` Scott James Remnant
2003-12-22 20:40     ` Greg KH
2003-12-23  7:29       ` Scott James Remnant
2003-12-23 22:13         ` Greg KH
2003-12-28  9:11           ` Scott James Remnant

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox