From: Marco d'Itri Date: Fri, 25 Nov 2005 18:02:25 +0000 (+0100) Subject: let udevsend ignore events with SEQNUM set X-Git-Tag: 174~2441 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=13141b9a6a046e2aca812b2442f12f116856addf;ds=sidebyside let udevsend ignore events with SEQNUM set Using syslog from udevsend for error logging when the daemon is not running, causes vc events and an udev event loop. --- diff --git a/udevsend.c b/udevsend.c index 8cabe9039..b67df9720 100644 --- a/udevsend.c +++ b/udevsend.c @@ -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");