From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrey Borzenkov Date: Wed, 06 Aug 2003 19:12:26 +0000 Subject: [PATCH] usb.rc - fix coldplug on 2.6 (no lister defined) MIME-Version: 1 Content-Type: multipart/mixed; boundary="Boundary-00=_aMVM/AaDpFHbuAT" Message-Id: List-Id: To: linux-hotplug@vger.kernel.org --Boundary-00=_aMVM/AaDpFHbuAT Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline On 2.6 lister is not used, but coldplug does not pass any information sufficient to find module. The patch makes it use sysfs and pass DEVPATH so usb.agent can get them from sysfs. regards -andrey --Boundary-00=_aMVM/AaDpFHbuAT Content-Type: text/x-diff; charset="us-ascii"; name="hotplug-2003_05_01-usb.rc-coldplug26.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="hotplug-2003_05_01-usb.rc-coldplug26.patch" --- hotplug-2003_05_01/etc/hotplug/usb.rc.coldplug26 2003-07-31 14:39:01.000000000 +0400 +++ hotplug-2003_05_01/etc/hotplug/usb.rc 2003-07-31 23:40:17.000000000 +0400 @@ -125,6 +125,9 @@ DEVICE= export DEVFS DEVICE + DEVPATH= + export DEVPATH + # these notifications will be handled by usbmodules # NOTE: we're not providing a full set of hotplug # parameters for USB. that's why "usbmodules" is a @@ -134,10 +137,21 @@ # FIXME usbmodules, or something, should set real # PRODUCT and DEVICE strings so /etc/hotplug/usb/* # scripts can rely on them ... - for DEVICE in /proc/bus/usb/*/* - do + # + # for 2.6 lister is disabled so either this should be fixed + # or we just use sysfs + if [ -d /sys/bus/usb/devices ]; then + declare device + for device in /sys/bus/usb/devices/*; do + DEVPATH=${device#/sys/} /etc/hotplug/usb.agent - done + done + else + for DEVICE in /proc/bus/usb/*/* + do + /etc/hotplug/usb.agent + done + fi } --Boundary-00=_aMVM/AaDpFHbuAT-- ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 _______________________________________________ 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