Why is hotplug a kernel helper?
If you don't mind me asking, I would like to know why the kernel calls a usermode helper for hotplug events? Wouldn't a chrdev be a better solution (especially considering that programs like magicdev could listen in to it as well)? Correct me if I'm wrong, but the kobject code never does check the return value from the usermode helper, right?
Fredrik Tolf
Quoted 4 lines · Fredrik Tolf
If you don't mind me asking, I would like to know why the kernel calls a usermode helper for hotplug events? Wouldn't a chrdev be a better solution (especially considering that programs like magicdev could listen in to it as well)?
Please see the archives for why this is, it's been argued many times.
Quoted 2 lines
Correct me if I'm wrong, but the kobject code never does check the return value from the usermode helper, right?
That is correct.
thanks,
greg k-h
Quoted 7 lines · Greg KH
Quoted 4 lines · Fredrik Tolf
If you don't mind me asking, I would like to know why the kernel calls a usermode helper for hotplug events? Wouldn't a chrdev be a better solution (especially considering that programs like magicdev could listen in to it as well)?
Please see the archives for why this is, it's been argued many times.
I am sincerely sorry for being a bother, but I have spent several hours searching far and wide for information on it, both in the archives and generally on the web, without any luck in finding anything. If it's not too much to ask, would you be as kind as to provide a pointer?
Btw., Is there any preferred method of announcing hotplug events to user interfaces?
Fredrik Tolf
Quoted 7 lines · Fredrik Tolf
Quoted 6 lines · Greg KH
Quoted 4 lines · Fredrik Tolf
If you don't mind me asking, I would like to know why the kernel calls a usermode helper for hotplug events? Wouldn't a chrdev be a better solution (especially considering that programs like magicdev could listen in to it as well)?
Quoted 7 lines
Quoted 1 line
Please see the archives for why this is, it's been argued many times.
I am sincerely sorry for being a bother, but I have spent several hours searching far and wide for information on it, both in the archives and generally on the web, without any luck in finding anything. If it's not too much to ask, would you be as kind as to provide a pointer?
Here was the latest thread where this was brought up:
http://marc.theaimsgroup.com/?t=105544548100008
I would suggest reading this post from Linus for a quick summary:
http://marc.theaimsgroup.com/?l=linux-kernel&m=105552804303171
Quoted 2 lines
Btw., Is there any preferred method of announcing hotplug events to user interfaces?
Yes there is a standard. Have you read the docs at
http://linux-hotplug.sf.net/ ? Also my 2001 OLS paper details the format the messages should be in, but it's a bit out of date as to the new values that the 2.6 kernel sends.
What do you want to use the hotplug interface for that it currently does not do?
Hope this helps,
greg k-h
Quoted 16 lines · Greg KH
Quoted 7 lines · Fredrik Tolf
Quoted 6 lines · Greg KH
Quoted 4 lines · Fredrik Tolf
If you don't mind me asking, I would like to know why the kernel calls a usermode helper for hotplug events? Wouldn't a chrdev be a better solution (especially considering that programs like magicdev could listen in to it as well)?
Quoted 7 lines
Quoted 1 line
Please see the archives for why this is, it's been argued many times.
I am sincerely sorry for being a bother, but I have spent several hours searching far and wide for information on it, both in the archives and generally on the web, without any luck in finding anything. If it's not too much to ask, would you be as kind as to provide a pointer?
Quoted 6 lines
Here was the latest thread where this was brought up:
http://marc.theaimsgroup.com/?t=105544548100008I would suggest reading this post from Linus for a quick summary:
http://marc.theaimsgroup.com/?l=linux-kernel&m=105552804303171
Thank you for those references. I must have mistyped something while searching, since all the keywords I searched for were in the text... Sorry for wasting your time on that.
Quoted 7 lines
Quoted 2 lines
Btw., Is there any preferred method of announcing hotplug events to user interfaces?
Yes there is a standard. Have you read the docs at
http://linux-hotplug.sf.net/ ? Also my 2001 OLS paper details the format the messages should be in, but it's a bit out of date as to the new values that the 2.6 kernel sends.
No, I haven't. I just put that question in the mail as a side-thing. I had not expected more than a yes/no reply. In any case, I will read it. Thanks again.
Quoted 2 lines
What do you want to use the hotplug interface for that it currently does not do?
Admittedly, I'm still using the RH8 hotplug scripts, and I suspect improvements have been made since then. I was mainly looking for a way to auto-mount USB mass storage devices without having to reconfigure anything as root. I have all the info I need now, though.
Thank you very much for your help.
Fredrik Tolf
Quoted 7 lines · Fredrik Tolf
Quoted 2 lines
What do you want to use the hotplug interface for that it currently does not do?
Admittedly, I'm still using the RH8 hotplug scripts, and I suspect improvements have been made since then. I was mainly looking for a way to auto-mount USB mass storage devices without having to reconfigure anything as root. I have all the info I need now, though.
Take a look at the devlabel package. That should do what you are looking for.
thanks,
greg k-h
Quoted 4 lines · Fredrik Tolf
Admittedly, I'm still using the RH8 hotplug scripts, and I suspect improvements have been made since then. I was mainly looking for a way to auto-mount USB mass storage devices without having to reconfigure anything as root. I have all the info I need now, though.
Hotplug (murasaki in my case) finds the devices just fine. The
automounter (autofs for local filesystems) automounts them when I change into the directory. Also just fine. In 2.4, no less. 2.6 as well.
Joel
Signature · 9 lines
"The nice thing about egotists is that they don't talk about other
people."
- Lucille S. Harper
Joel Becker
Senior Member of Technical Staff
Oracle Corporation
E-mail: [email protected]
Phone: (650) 506-8127Quoted 2 lines · Greg KH
I would suggest reading this post from Linus for a quick summary:
http://marc.theaimsgroup.com/?l=linux-kernel&m=105552804303171
I don't really see what's so bad about acpid. The code is dead simple. Now, I'm not saying it is better than hotplug, but I really don't see them as being too different.
Sorry to chime in :)