From: Nathan H. <hj...@un...> - 2003-06-17 17:44:14
|
On Tue, 17 Jun 2003, Richard Elmore wrote: > > On Monday, June 16, 2003, at 06:10 AM, Stephen H. Westin wrote: > > > I concur with this. In Mac OS X, I dont' think there's a reasonable > > way to call a user-mode program from the hotplug process. One would > > have to write a kernel-mode driver, I think, to make this happen. And > > I don't think there's a Unix-style device name; just a multi-digit > > "location" code. > > > > On Mac OS X a user-mode program can register a callback function with > IOKit that will be invoked when a USB device is plugged/unplugged using > the routine IOServiceAddMatchingNotification. There is an example of > how to register a notification in the "Working with USB Interfaces" > document available on Apple's web site. > > In some ways I would like to see libusb mimic some of the functionality > of IOKit more closely. Of the four USB subsystems I have had to write > code for (Mac OS 9, Mac OS X, Linux & Windows) it is (IMO) the nicest. I agree with you about making libusb act more like IOKit, but I also feel that libusb should act the same on all the platforms it has been ported to.... So, it would take some work (and proabably kernel-level code?) to do so. So, I dont think it should be done but I am willing to write the necessary code if the other developers of libusb disagree w/ me? ------------------------------------- | Nathan Hjelm | Alumni, UNM School of Engineering | email: hj...@cs... | aim : hjelmnt ------------------------------------- |