From mboxrd@z Thu Jan 1 00:00:00 1970 From: Johannes Erdfelt Date: Mon, 06 Feb 2006 23:29:41 +0000 Subject: Re: [Libusb-devel] udev craze: need /dev/bus/usb rationale Message-Id: <20060206232941.GO24785@sventech.com> List-Id: References: <20060126094517.GA4063@bode.aurel32.net> In-Reply-To: <20060126094517.GA4063@bode.aurel32.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Fri, Jan 27, 2006, Linus Walleij wrote: > On Fri, 27 Jan 2006, Johannes Erdfelt wrote: > >In libusb 1.0, we open /proc/bus/usb/devices and poll on the fd to get > >informed when the bus state changes (device plugged in or disconnected). > > > >Is there a replacement in sysfs? > > Intuitively I would say that linux.c should be rewritten to make use of > inotify where available, i.e. register a callback for events in > /dev/bus/usb (/proc/bus/usb) and act on these callbacks instead of > polling. > > Does any of the kernel guys know if this is a good way to go? > > Perhaps there is an even smarter way. I'm working on implementing inotify support into libusb 1.0 right now. Greg KH had suggested tighter integration into dbus, but I don't want to bring in that dependency if it's not necessary. JE ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642 _______________________________________________ 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