Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[udev] couldn't open device directory (solved)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Tanisete
Guru
Guru


Joined: 12 Mar 2004
Posts: 312

PostPosted: Thu Aug 25, 2005 6:57 pm    Post subject: [udev] couldn't open device directory (solved) Reply with quote

Hi to all!!

I'm facing a kind of a problem. When i write a udev rule, i need to know some parameters, as the sysfs{model}, but now, i don't know why, "udevinfo -a -p" doesn't give me the full output, and i have to search through /sys/devices the info manually... and this is a bit disgusting ;)

I get this:

Code:
udevinfo -a -p /sys/block/sdc/sdc5/

udevinfo starts with the device the node belongs to and then walks up the
device chain, to print for every device found, all possibly useful attributes
in the udev key format.
Only attributes within one device section may be used together in one rule,
to match the device for which the node will be created.

device '/sys/block/sdc/sdc5' has major:minor 8:37
  looking at class device '/sys/block/sdc/sdc5':
    SUBSYSTEM=="block"
    SYSFS{dev}=="8:37"
    SYSFS{size}=="153677727"
    SYSFS{start}=="158898978"
    SYSFS{stat}=="     184      458     2181    17448"

follow the "device"-link to the physical device:
  looking at the device chain at '/sys/devices/pci0000:00/0000:00:02.1/usb2/2-5/2-5:1.0/host6/target6:0:0/6:0:0:0':
    BUS=="scsi"
    ID=="6:0:0:0"
    DRIVER=="sd"
    SYSFS{device_blocked}=="0"
    SYSFS{iocounterbits}=="32"
    SYSFS{iodone_cnt}=="0x150"
    SYSFS{ioerr_cnt}=="0x0"
    SYSFS{iorequest_cnt}=="0x150"
    SYSFS{max_sectors}=="240"
    SYSFS{model}=="WD1600BB-00FTA0 "
    SYSFS{queue_depth}=="1"
    SYSFS{queue_type}=="none"
    SYSFS{rev}=="15.0"
    SYSFS{scsi_level}=="3"
    SYSFS{state}=="running"
    SYSFS{timeout}=="30"
    SYSFS{type}=="0"
    SYSFS{vendor}=="WDC     "

couldn't open device directory


I'm using udev-058, dbus-023-r3, and hal 0.4.8, with 2.6.12 kernel.

Can anyone help me?

Thanks a lot!!!


Last edited by Tanisete on Thu Aug 25, 2005 7:12 pm; edited 1 time in total
Back to top
View user's profile Send private message
Raistlin
l33t
l33t


Joined: 17 May 2004
Posts: 691
Location: Boston, MA

PostPosted: Thu Aug 25, 2005 7:03 pm    Post subject: Reply with quote

Hi,

although you seem to get a lot of information (isn't this enough already?) you could try a
Code:
dmesg
, see what us-bus it is connected to (here it is, e.g.
Code:
usb 1-3: new high speed USB device using ehci_hcd and address 7
scsi4 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 7
usb-storage: waiting for device to settle before scanning
...

)
and then do a
Code:
udevinfo -a -p /sys/bus/usb/devices/1-3/


Cheers, R.
_________________
Zwei Was Eins Initially

"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it."
Back to top
View user's profile Send private message
Tanisete
Guru
Guru


Joined: 12 Mar 2004
Posts: 312

PostPosted: Thu Aug 25, 2005 7:11 pm    Post subject: Reply with quote

Yes, with this command, it gives the info i wanted to know. Thanks a lot!!

Does you know why older udev releases gived with the first command all the output, and now it doesn't?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum