communication between applications and hotplugd
Hi
I'm new to that list, so excuse me, if that has already been asked or discussed.
Is there a way an application can communicate directly with the hotplugd, instead of just a bunch of scripts ?
I'm implementing an application for KDE, which would need information about plugging/unplugging devices, device types and if possibly major/minor device numbers (or device node names corresponding with the newly added/removed devices).
I only saw a set of many scripts on my linux installation, but nothing what I could use distribution independently.
Is there something, what I missed ?
Kind regards
Joseph Wenninger
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 2 lines
Is there a way an application can communicate directly with the hotplugd, instead of just a bunch of scripts ?
/sbin/hotplug is invoked by the kernel as the way it reports hotplug events ... there is no "hotplugd".
What you could do is have /sbin/hotplug forward those events to some application using named pipes or sockets. That's been discussed as one of the mechanisms by which the X11 server, for one example, would learn about new input devices. Clearly it could work for any kind of hotplug event.
As for notification about new /dev nodes (char/block major and minor) ... you might be able to make "devfsd" do it. Remember that there's no linkage within the kernel between the device ids it uses (c/b major/minor) and the filenames assigned to them in /dev, except for systems that use devfs. Until "driverfs" gets more functional (in 2.5) I suspect some of what you want is going to be difficult.
- Dave
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 5 lines · Joseph Wenninger
I'm implementing an application for KDE, which would need information about plugging/unplugging devices, device types and if possibly major/minor device numbers (or device node names corresponding with the newly added/removed devices).
driverfs combined with /sbin/hotplug will provide this information to you in 2.5 soon. Pat Mochel and I just presented how this will be done at the 2002 Ottawa Linux Symposium. I don't know if the talks are online yet, but later this week, we'll have something written down and post it to lkml for how it will all work.
Basically driverfs will export the major/minor number for the device, and /sbin/hotplug will be called when the device shows up or disappears. With this, devfs is no longer needed, and all of the naming policy can move to userspace. More details later, I'm supposed to be on vacation right now :)
thanks,
greg k-h
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel