From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Kay Sievers" Date: Tue, 10 Jul 2007 16:19:45 +0000 Subject: Re: udev/ubuntu problem solved Message-Id: <3ae72650707100919m1579d828l8380a279bf607300@mail.gmail.com> List-Id: References: <200707101653.31621.aj@dungeon.inka.de> In-Reply-To: <200707101653.31621.aj@dungeon.inka.de> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On 7/10/07, Andreas Jellinghaus wrote: > On Tuesday 10 July 2007 17:39:24 Kay Sievers wrote: > > What are theses guys smoking? That's so sick to bind-mount > > /dev-directories to /proc! I wouldn't support such a system at all. It > > is totally broken. > > I was worried about that too. I guess they made that change so all > applications get the benefit of the ACL's in /dev/bus/usb without changes > to the source code (i.e. path adjustment). Libusb takes care of that, it handles /dev/bus/usb by default, and falls back to /proc if it doesn't exist. > > Are you using PROGRAM? That is for plugging external program into udev > > to give devices a name or symlink. If you use RUN+=, your program > > never runs before the node and all symlinks are created. > > no I'm using RUN+= and I thought this would work the wy you described. > testing on ubuntu edgy (which has udev 108-0ubuntu4) shows this is different. > when I have my loop inside the script I RUN+= I can increase the timeout to 20 > seconds, still it times out as the $DEVICE file is not there. if I have the > script start the loop in the background then it find the file after 100 ms > (one sleep). Oh, you are on a different event, not the one that creates the node. The "usb_device" class devices create the node, but you hook into the usb interface. On older kernel it's a timing problem, without a proper solution. Kernel 2.6.22 will create the device nodes from the parent device of the interface, so in the future this work properly. > maybe my diagnosis is a bit off: not the device file is created late, but the > DEVICE event is processed first, and the other events are in a queue in the > meantime till my RUN+= script is finished? and some other event triggers the > creation of /dev/bus/usb/NNN/NNN and it is processes after the event with > MODALIAS and DEVICE=/proc/bus/usb/NNN/NNN ? that would explain what I'm seing > too. is this explanation possible? Yeah, the "interface device" and the "node device" are siblings in the kernel device tree and therefore have no defined order and udev can't access the properties from each other. 2.6.22 should solve that problem. Kay ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ 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