chiark / gitweb /
volume_id: generate man page from xml source
[elogind.git] / udevsend.c
index 8cabe9039bcf061a708260511dd9bd8e4b18c424..1b9860baca5ecfbf6537958a4a0edc27265a4722 100644 (file)
@@ -33,9 +33,7 @@
 #include <linux/stddef.h>
 
 #include "udev.h"
-#include "udev_version.h"
 #include "udevd.h"
-#include "logging.h"
 
 /* global variables */
 static int sock = -1;
@@ -67,7 +65,7 @@ int main(int argc, char *argv[], char *envp[])
 
        logging_init("udevsend");
 #ifdef USE_LOG
-       udev_init_config();
+       udev_config_init();
 #endif
        dbg("version %s", UDEV_VERSION);
 
@@ -96,6 +94,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");