hotplugd not working on DF-3.3-dev

william opensource4you william.os4y at gmail.com
Thu Apr 25 13:37:49 PDT 2013


All,

I'm playing with DF-3.3 with Dprots, but have some difficulties with
hotplugd :-(.

In fact, hotplugd crash quite rapidely with the following message:
"hotplugd[28024]: read: Interrupted system call".

After some research on internet, I've found someone having the same problem :-).
http://stackoverflow.com/questions/8418020/libudev-strange-behavior-v1-7-2-onwards

I've applied this patch, an now the deamon hotplugd does not crash anymore :-).
But the event "attach" and "detach" have changed ???
(maybe my fault).
instead this is now "add" and "remove"


So the complete patch is the following:


dfly# diff hotplugd.c hotplugd.c_orig
147,154d146
< int fd = udev_monitor_get_fd(udev_monitor);
<                 fd_set fdset;
<                 FD_ZERO(&fdset);
<                 FD_SET(fd, &fdset);
<                 if(select(fd+1, &fdset, NULL, NULL, NULL) < 0) {
<                     /* error in select */
<                     continue;
<                 }
164c156
< if (strcmp(prop, "add") == 0) {
---
> if (strcmp(prop, "attach") == 0) {
169c161
< } else if (strcmp(prop, "remove") == 0) {
---
> } else if (strcmp(prop, "detach") == 0) {




I'm not saying this is the best patch, but it works on my machine.


W.



More information about the Users mailing list