chiark / gitweb /
let udevsend ignore events with SEQNUM set
authorMarco d'Itri <md@Linux.IT>
Fri, 25 Nov 2005 18:02:25 +0000 (19:02 +0100)
committerKay Sievers <kay.sievers@suse.de>
Fri, 25 Nov 2005 18:02:25 +0000 (19:02 +0100)
Using syslog from udevsend for error logging when the daemon is not
running, causes vc events and an udev event loop.

udevsend.c

index 8cabe9039bcf061a708260511dd9bd8e4b18c424..b67df9720b0e81b97ff811046e3a60881b947a70 100644 (file)
@@ -96,6 +96,13 @@ int main(int argc, char *argv[], char *envp[])
                key = envp[i];
                keylen = strlen(key);
 
+               /* ignore events which are already sent on the netlink socket */
+               if (strncmp(key, "SEQNUM=", 7) == 0) {
+                       dbg("ignoring event with SEQNUM set");
+                       retval = 0;
+                       goto exit;
+               }
+
                /* prevent loops in the scripts we execute */
                if (strncmp(key, "UDEVD_EVENT=", 12) == 0) {
                        err("event loop, already passed through the daemon, exit");