Question about Hot device Identity
Hi, Greg
After read your udev code, I know that there are three components would be done
in the udev project
1) udev - dynamic replacement for /dev
2) namedev - device naming
3) libsysfs - a standard library for accessing device information on thesystem.
So, is there any progress on the namedev and libsysfs? I found your udev is based on the sysfs file system, but if sysfs can not be accepted by linux kernel, how will udev going?
Is the udev project still as a part of linux hotplug when it is released?
I think there are some tasks are waiting to do, so could you please tell the detailed progress in current udev project?
Thank you in advance for your kind help.
Thanks
Guo Min
The content of this email message solely contains my own personal views, and not those of my employer.
-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 5 lines · Min
Hi, Greg
After read your udev code, I know that there are three components would be done
in the udev project
Quoted 7 lines
1) udev - dynamic replacement for /dev
2) namedev - device naming
3) libsysfs - a standard library for accessing device information on thesystem.So, is there any progress on the namedev and libsysfs? I found your udev is based on the sysfs file system, but if sysfs can not be accepted by linux kernel, how will udev going?
Um, sysfs _is_ in the kernel already.
As for the progress of libsysfs, yes, there are some people working on it. Hopefully they will release something publicly soon (hint, hint, hint...)
Quoted 1 line
Is the udev project still as a part of linux hotplug when it is released?
It will use the /sbin/hotplug hook that the current linux-hotplug release uses. Does that explain what you are asking?
And there is already a version of udev "released" it's on the kernel.org site if you want to play with it.
Quoted 2 lines
I think there are some tasks are waiting to do, so could you please tell the detailed progress in current udev project?
Most of the work has been on the OLS presentation lately, but after OLS a lot more time will be available to work on it.
If there's any part of udev that you want to help out on right now, feel free to let me know.
thanks,
greg k-h
-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Thanks a lot!
I am now playing with your udev:-), and I encounter some problems.
I use a usb mouse as a PnP devices, after I mount sysfs, I can not
find any devices in /sysfs/devices/pci0/00:0f.2 as DEVPATH=/devices/pci0/00:09.0/usb1/1-1/1-1.1/ttyUSB7 in the test file udev supplied.
00:0f.2 is my USB controller,
ls /sysfs/devices/pci0/00:0f.2
class irq power subsystem_device vendor
device name resource subsystem_vendor
So I think the configuration files you given out is for usb hub,is that right? For the common USB mouse, can I only configure DEVPATH=/sysfs/devices/pci0/00:0f.2? I tried this,but no results. Could you please tell me what cause this problem?
Thanks
Guo Min
-----Original Message-----
From: Greg KH [mailto:[email protected]]
Sent: Monday, June 23, 2003 11:23 AM
To: Guo, Min
Cc: [email protected]
Subject: Re: Question about Hot device Identity
Quoted 5 lines · Min
Hi, Greg
After read your udev code, I know that there are three components would be done
in the udev project
Quoted 7 lines
1) udev - dynamic replacement for /dev
2) namedev - device naming
3) libsysfs - a standard library for accessing device information on thesystem.So, is there any progress on the namedev and libsysfs? I found your udev is based on the sysfs file system, but if sysfs can not be accepted by linux kernel, how will udev going?
Um, sysfs _is_ in the kernel already.
As for the progress of libsysfs, yes, there are some people working on it. Hopefully they will release something publicly soon (hint, hint, hint...)
Quoted 1 line
Is the udev project still as a part of linux hotplug when it is released?
It will use the /sbin/hotplug hook that the current linux-hotplug release uses. Does that explain what you are asking?
And there is already a version of udev "released" it's on the kernel.org site if you want to play with it.
Quoted 2 lines
I think there are some tasks are waiting to do, so could you please tell the detailed progress in current udev project?
Most of the work has been on the OLS presentation lately, but after OLS a lot more time will be available to work on it.
If there's any part of udev that you want to help out on right now, feel free to let me know.
thanks,
greg k-h
-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 12 lines · Min
Thanks a lot!
I am now playing with your udev:-), and I encounter some problems.I use a usb mouse as a PnP devices, after I mount sysfs, I can not find any devices in /sysfs/devices/pci0/00:0f.2 as DEVPATH=/devices/pci0/00:09.0/usb1/1-1/1-1.1/ttyUSB7 in the test file udev supplied.
00:0f.2 is my USB controller,
ls /sysfs/devices/pci0/00:0f.2
Quoted 7 lines
class irq power
subsystem_devicevendor
device name resourcesubsystem_vendorSo I think the configuration files you given out is for usb hub,is that right? For the common USB mouse, can I only configure DEVPATH=/sysfs/devices/pci0/00:0f.2? I tried this,but no results. Could you please tell me what cause this problem?
What problem? udev only creates dev entries for things that show up in /sys/class/* that have a file called "dev" in them. Right now, there is no kernel support for mice under /sys/class/ (but there was a patch proposed for this posted to linux-kernel by Hanna Linder a few weeks ago.)
Because of this, udev will not work for your mouse right now, sorry.
So right now my main focus has been providing support in the kernel for /sys/class for all types of devices, as that is what udev needs. Help with this effort is greatly appreciated.
thanks,
gre k-h
-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Oh, could you please give me an example USB device that udev supported now?
I tried another USB cdrom, I found there are no dev file in /sysfs/class directory.
Whether I need patch kernel.org/pub/linux/kernel/people/gregkh/misc/kobject-hotplug-?-2.5.67.patch for USB cdrom?
I would like to develop the test suite for Udev firstly, thank you for your kind help.
Thanks
Guo Min
-----Original Message-----
From: Greg KH [mailto:[email protected]]
Sent: Wednesday, June 25, 2003 12:21 AM
To: Guo, Min
Cc: [email protected]
Subject: Re: Question about Hot device Identity
Quoted 12 lines · Min
Thanks a lot!
I am now playing with your udev:-), and I encounter some problems.I use a usb mouse as a PnP devices, after I mount sysfs, I can not find any devices in /sysfs/devices/pci0/00:0f.2 as DEVPATH=/devices/pci0/00:09.0/usb1/1-1/1-1.1/ttyUSB7 in the test file udev supplied.
00:0f.2 is my USB controller,
ls /sysfs/devices/pci0/00:0f.2
Quoted 7 lines
class irq power
subsystem_devicevendor
device name resourcesubsystem_vendorSo I think the configuration files you given out is for usb hub,is that right? For the common USB mouse, can I only configure DEVPATH=/sysfs/devices/pci0/00:0f.2? I tried this,but no results. Could you please tell me what cause this problem?
What problem? udev only creates dev entries for things that show up in /sys/class/* that have a file called "dev" in them. Right now, there is no kernel support for mice under /sys/class/ (but there was a patch proposed for this posted to linux-kernel by Hanna Linder a few weeks ago.)
Because of this, udev will not work for your mouse right now, sorry.
So right now my main focus has been providing support in the kernel for /sys/class for all types of devices, as that is what udev needs. Help with this effort is greatly appreciated.
thanks,
gre k-h
-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 2 lines · Min
Oh, could you please give me an example USB device that udev supported now?
Any usb device that uses the usb major number. This includes usb printers, scanners, and a bunch of other assorted devices.
Quoted 2 lines
I tried another USB cdrom, I found there are no dev file in /sysfs/class directory.
Block devices also work just fine. So this should work as long as you have something created in sys/block for your cdrom drive.
Quoted 3 lines
Whether I need patch kernel.org/pub/linux/kernel/people/gregkh/misc/kobject-hotplug-?-2.5.67.patch for USB cdrom?
If you are using the 2.5.67 kernel, yes. I'd recommend 2.5.73, and you will not need it.
Quoted 2 lines
I would like to develop the test suite for Udev firstly, thank you for your kind help.
Great, that would be greatly appreciated.
thanks,
greg k-h
-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
I download the linux2.5.73 and use USB CDROM to do the testing.
ls /sysfs
Quoted 1 line
block bus cdev class devices firmware
ls /sysfs/class
Quoted 1 line
firmware input net
pcmcia_socketscsi_devicescsi_hosttty usb
ls /sysfs/block
Quoted 1 line
fd0 hda initrd sda
ls /sysfs/devices/pci0
Quoted 1 line
0000:00:00.0 0000:00:02.0 0000:00:0f.0 0000:00:0f.2 power
0000:00:00.1 0000:00:03.0 0000:00:0f.1 name
ls /sysfs/devices/pci0/0000\:00\:0f.2/
Quoted 1 line
class irq power
subsystem_devicevendor
device name resource subsystem_vendor
0000:00:0f.2 is my USB controller.
So ,in such environment, how to configure DEVPATH in test file?
I write it as DEVPATH=/devices/pci0/00:0f.0/, but I don't think it is right, because there are no usb device in the directory, if so, does it means Udev does not support the USB cdrom? If not, could you please tell me how to configure the USB BLOCK device's DEVPATH in test file?
Another question is whether 2.5.73 supports USB mice?
Sorry to ask you so many questions, because I can not run the Udev correctly till now, thank you very much!
Thanks
Guo Min
-----Original Message-----
From: Greg KH [mailto:[email protected]]
Sent: Wednesday, June 25, 2003 10:34 AM
To: Guo, Min
Cc: [email protected]
Subject: Re: Question about Hot device Identity
Quoted 2 lines · Min
Oh, could you please give me an example USB device that udev supported now?
Any usb device that uses the usb major number. This includes usb printers, scanners, and a bunch of other assorted devices.
Quoted 2 lines
I tried another USB cdrom, I found there are no dev file in /sysfs/class directory.
Block devices also work just fine. So this should work as long as you have something created in sys/block for your cdrom drive.
Quoted 3 lines
Whether I need patch kernel.org/pub/linux/kernel/people/gregkh/misc/kobject-hotplug-?-2.5.67.patch for USB cdrom?
If you are using the 2.5.67 kernel, yes. I'd recommend 2.5.73, and you will not need it.
Quoted 2 lines
I would like to develop the test suite for Udev firstly, thank you for your kind help.
Great, that would be greatly appreciated.
thanks,
greg k-h
-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 4 lines · Min
So ,in such environment, how to configure DEVPATH in test file?
I write it as DEVPATH=/devices/pci0/00:0f.0/, but I don't think it is right, because there are no usb device in the directory, if so, does it means Udev does not support the USB cdrom? If not, could you please tell me how to configure the USB BLOCK device's DEVPATH in test file?
For a block device, there is no need to know whether it is a USB device or any other type of device. The bus type, connection method, etc. are immaterial. It is a block device, shows up in /sys/block, and a block-device node can be produced in /dev for it.
Is there some particular reason you think that it is important to handle it as a "USB block" device instead of just a generic block device?
-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 2 lines · Min
I download the linux2.5.73 and use USB CDROM to do the testing.
ls /sysfs
Why /sysfs? Why not /sys like everyone is standardizing on?
Quoted 7 lines
Quoted 1 line
block bus cdev class devices firmware
ls /sysfs/class
Quoted 1 line
firmware input net
pcmcia_socketscsi_devicescsi_hosttty usbls /sysfs/block
Quoted 1 line
fd0 hda initrd sda
ls /sysfs/devices/pci0
Quoted 1 line
0000:00:00.0 0000:00:02.0 0000:00:0f.0 0000:00:0f.2 power
Quoted 8 lines
0000:00:00.1 0000:00:03.0 0000:00:0f.1 name
ls /sysfs/devices/pci0/0000\:00\:0f.2/Quoted 1 line
class irq power
subsystem_devicevendordevice name resource
subsystem_vendor0000:00:0f.2 is my USB controller.
So ,in such environment, how to configure DEVPATH in test file?
udev only cares about DEVPATH values for class devices. It ignores DEVPATH values for other kinds of devices. So set it to your block device and you should be fine.
Quoted 1 line
Another question is whether 2.5.73 supports USB mice?
Yes, the kernel does. Even 2.2 does :)
greg k-h
-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
I can not find the file dev in the /sys/class/usb, does it means that Udev does not support my USB CDROM? If not, which file is behalf of my USB CDROM device?
you said that udev only creates dev entries for things that show up in /sys/class/* that have a file called "dev" in them, in my machine,
# ls /sys/ block bus cdev class devices firmware #ls /sys/class/usb/ #ls /sys/bus/usb/devices/ Both the outputs are null, I think the system has not recognized the USB devices, is that right?
Oh, the second question is whether the patch for Udev to support USB mice has been applied to kernel 2.5.73?
Thank you very much!
Thanks
Guo Min
-----Original Message-----
From: Greg KH [mailto:[email protected]]
Sent: Thursday, June 26, 2003 1:01 AM
To: Guo, Min
Cc: [email protected]
Subject: Re: Question about Hot device Identity
Quoted 2 lines · Min
I download the linux2.5.73 and use USB CDROM to do the testing.
ls /sysfs
Why /sysfs? Why not /sys like everyone is standardizing on?
Quoted 7 lines
Quoted 1 line
block bus cdev class devices firmware
ls /sysfs/class
Quoted 1 line
firmware input net
pcmcia_socketscsi_devicescsi_hosttty usbls /sysfs/block
Quoted 1 line
fd0 hda initrd sda
ls /sysfs/devices/pci0
Quoted 1 line
0000:00:00.0 0000:00:02.0 0000:00:0f.0 0000:00:0f.2 power
Quoted 8 lines
0000:00:00.1 0000:00:03.0 0000:00:0f.1 name
ls /sysfs/devices/pci0/0000\:00\:0f.2/Quoted 1 line
class irq power
subsystem_devicevendordevice name resource
subsystem_vendor0000:00:0f.2 is my USB controller.
So ,in such environment, how to configure DEVPATH in test file?
udev only cares about DEVPATH values for class devices. It ignores DEVPATH values for other kinds of devices. So set it to your block device and you should be fine.
Quoted 1 line
Another question is whether 2.5.73 supports USB mice?
Yes, the kernel does. Even 2.2 does :)
greg k-h
-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 4 lines · Min
I can not find the file dev in the
/sys/class/usb, does it means that Udev does not support my USB CDROM? If not, which file is behalf of my USB CDROM device?
I think you've missed the point here. There is no such thing as a "generic" USB device that could have a dev file for it in /sys/class/usb. For a device to have a dev file, it must have some sort of device-specific driver talking to it. If that driver exists and is loaded, it will (or should) have a class of its own under /sys/class, and the dev file will be there.
In the case of a USB CD-ROM, that is handled by the usb-storage driver, but that driver _still_ does not create a dev file, because it does not directly expose itself to userspace (there is no way to talk to the usb-storage driver itself). usb-storage connects the device the
SCSI midlayer, which then attaches the sd (SCSI disk) driver to the
device. _That_ driver is actually a real device that the user can interact with, so it creates a dev file in the appropriate place, namely /sys/block. You can think of /sys/block as a special-case class, and consider it equivalent to /sys/class/block (although it's more than that).
The only devices that will ever have "dev" files in /sys for them are those that can actually can communicated with from userspace. There is no need for userspace to treat your USB CD-ROM as a USB CD-ROM, instead it just considers it to be a generic disk (block) device that holds read-only media. I don't see any reason this device will ever generate any directories under /sys/class/... with dev files in them, they're not necessary.
But, this has nothing to do with whether udev can support your device or not and create a node in /dev for it. udev should be able to do exactly that, but I don't know whether it currently looks only at /sys/class (which I think is the case) or whether it also looks at /sys/block.
-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Sorry, I make a mistake, I has UHCI built-in but OHCI not, but my USB controller is OHCI type, so I can not find my cdrom in /sys/block.
Here I run the Udev as following procedure.
1. mount -t sysfs sysfs /sys
2. Edit the udev.h file and replace the following variables with values that make sense for your system:
#define SYSFS_ROOT "/sys"
#define UDEV_ROOT "/root/udev/"
#define DEV_FILE "/dev"
#define MKNOD "/bin/mknod"3 . Run make to build the project
4. Point /proc/sys/kernel/hotplug at the location of the udev binary that
is created. so I change /proc/sys/kernel/hotplug 's content to /root/udev/udev.is this right?
5. Set DEVPATH to /sys/devices/pci0/0000:00:0f.2/usb1/1-1/1-1:0/host2/2:0:0:0/scd0
I don't know whether scd0 is right, because there are no scd0 in the path /sys/devices/pci0/0000:00:0f.2/usb1/1-1/1-1:0/host2/2:0:0:0,but I can mount the USB CDROM with /dev/scd0,there is a dev file in my /sys/block/sr0 directory.
here is the detailed outputs of usb1.
#ls /sys/devices/pci0/0000:00:0f.2/usb1/1-1/1-1:0/host2/2:0:0:0
access_count block device_blocked model name online power queue_depth rescan rev scsi_level type vendor
6. run . ./test to see the result.
But what things should happen here? in my machine, there are no outputs, I think dbg information should be outputed at least.
Thanks
Guo Min
The content of this email message solely contains my own personal views, and not those of my employer.
-----Original Message-----
From: Kevin P. Fleming [mailto:[email protected]]
Sent: Thursday, June 26, 2003 12:10 PM
To: [email protected]
Subject: Re: Question about Hot device Identity
Quoted 4 lines · Min
I can not find the file dev in the
/sys/class/usb, does it means that Udev does not support my USB CDROM? If not, which file is behalf of my USB CDROM device?
I think you've missed the point here. There is no such thing as a "generic" USB device that could have a dev file for it in /sys/class/usb. For a device to have a dev file, it must have some sort of device-specific driver talking to it. If that driver exists and is loaded, it will (or should) have a class of its own under /sys/class, and the dev file will be there.
In the case of a USB CD-ROM, that is handled by the usb-storage driver, but that driver _still_ does not create a dev file, because it does not directly expose itself to userspace (there is no way to talk to the usb-storage driver itself). usb-storage connects the device the
SCSI midlayer, which then attaches the sd (SCSI disk) driver to the
device. _That_ driver is actually a real device that the user can interact with, so it creates a dev file in the appropriate place, namely /sys/block. You can think of /sys/block as a special-case class, and consider it equivalent to /sys/class/block (although it's more than that).
The only devices that will ever have "dev" files in /sys for them are those that can actually can communicated with from userspace. There is no need for userspace to treat your USB CD-ROM as a USB CD-ROM, instead it just considers it to be a generic disk (block) device that holds read-only media. I don't see any reason this device will ever generate any directories under /sys/class/... with dev files in them, they're not necessary.
But, this has nothing to do with whether udev can support your device or not and create a node in /dev for it. udev should be able to do exactly that, but I don't know whether it currently looks only at /sys/class (which I think is the case) or whether it also looks at /sys/block.
-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 6 lines · Kevin P. Fleming
But, this has nothing to do with whether udev can support your device or not and create a node in /dev for it. udev should be able to do exactly that, but I don't know whether it currently looks only at
/sys/class(which I think is the case) or whether it also looks at/sys/block.
Yes, udev can handle things in /sys/block.
Actually it doesn't care where things are located in sysfs, it only looks to see if there is a file called "dev" in the directory passed to it in DEVPATH. If there is, it will then act apon that device.
Hope this helps in clearing up things.
greg k-h
-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 3 lines · Min
I can not find the file dev in the
/sys/class/usb, does it means that Udev does not support my USB CDROM? If not, which file is behalf of my USB CDROM device?
/sys/block/<something>
Quoted 2 lines
Oh, the second question is whether the patch for Udev to support USB mice has been applied to kernel 2.5.73?
No, input devices currently do not export class information yet. A patch was posted to lkml, but it is currently being reworked.
thanks,
greg k-h
-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 4 lines · Min
4. Point
/proc/sys/kernel/hotplugat the location of the udev binary that is created. so I change/proc/sys/kernel/hotplug's content to/root/udev/udev.isthis right?
Yes, this is one way to do it.
Another way is to just put udev at /etc/hotplug.d/default/ calling it udev.hotplug
This requires the latest version of the hotplug package to do so.
Quoted 1 line
5. Set DEVPATH to /sys/devices/pci0/0000:00:0f.2/usb1/1-1/1-1:0/host2/2:0:0:0/scd0
No, set DEVPATH to something that has a "dev" file in it, which is not this.
Quoted 2 lines
But what things should happen here? in my machine, there are no outputs, I think dbg information should be outputed at least.
What debug info? :)
Did you build udev with debugging enabled? If so, look in the debug log on the box.
thanks,
greg k-h
-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
So do you mean that I can set my DEVPATH to /sys/block/sr0/?
because there is a dev file in the directory. But I wonder why
the there are no dev file in directory /sys/devices/pci0/0000:00:0f.2/usb1/1-1/1-1:0/host2/2:0:0:0/, Accoring to Flemming's comments,the sysfs will not create a dev file for USB CDROM, is that right?
I did set the DEBUG = true, but nothing is outputed.
Thanks
Guo Min
-----Original Message-----
From: Greg KH [mailto:[email protected]]
Sent: Friday, June 27, 2003 1:14 AM
To: [email protected]
Subject: Re: Question about Hot device Identity
Quoted 6 lines · Kevin P. Fleming
But, this has nothing to do with whether udev can support your device or not and create a node in /dev for it. udev should be able to do exactly that, but I don't know whether it currently looks only at
/sys/class(which I think is the case) or whether it also looks at/sys/block.
Yes, udev can handle things in /sys/block.
Actually it doesn't care where things are located in sysfs, it only looks to see if there is a file called "dev" in the directory passed to it in DEVPATH. If there is, it will then act apon that device.
Hope this helps in clearing up things.
greg k-h
-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 2 lines · Min
So do you mean that I can set my DEVPATH to
/sys/block/sr0/? because there is a dev file in the directory.
Yes.
Quoted 4 lines
But I wonder why the there are no dev file in directory /sys/devices/pci0/0000:00:0f.2/usb1/1-1/1-1:0/host2/2:0:0:0/, Accoring to Flemming's comments,the sysfs will not create a dev file for USB CDROM, is that right?
Correct, there is no dev file in that directory, as the device interacts with the user through the block layer, which is in /sys/block.
udev only cares about classes, not devices.
Quoted 1 line
I did set the DEBUG = true, but nothing is outputed.
Sorry, don't know, it works for me :)
thanks,
greg k-h
-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel