- if (bufpos + keylen >= HOTPLUG_BUFFER_SIZE-1) {
- dbg("environment buffer too small, probably not called by the kernel");
+
+ /* prevent loops in the scripts we execute */
+ if (strncmp(key, "UDEVD_EVENT=", 12) == 0) {
+ dbg("seems that the event source is not the kernel, just exit");
+ goto exit;
+ }
+
+ if (bufpos + keylen >= UEVENT_BUFFER_SIZE-1) {
+ err("environment buffer too small, probably not called by the kernel");