]> err.no Git - systemd/commitdiff
log an error when a message from the wrong version of udevadm is ignored
authorMarco d'Itri <md@linux.it>
Mon, 19 Jul 2010 08:56:37 +0000 (10:56 +0200)
committerKay Sievers <kay.sievers@vrfy.org>
Mon, 19 Jul 2010 08:56:37 +0000 (10:56 +0200)
libudev/libudev-monitor.c

index b3e5d5f348499bb20acb0a208fe414cfb75b4861..a3789c4d1340561e468f1b32629c2c9cfe0be18e 100644 (file)
@@ -625,8 +625,11 @@ retry:
        if (memcmp(buf, "libudev", 8) == 0) {
                /* udev message needs proper version magic */
                nlh = (struct udev_monitor_netlink_header *) buf;
-               if (nlh->magic != htonl(UDEV_MONITOR_MAGIC))
+               if (nlh->magic != htonl(UDEV_MONITOR_MAGIC)) {
+                       err(udev_monitor->udev, "ignored a message from an invalid release of udevadm (%x != %x)\n",
+                           nlh->magic, htonl(UDEV_MONITOR_MAGIC));
                        return NULL;
+               }
                if (nlh->properties_off+32 > buflen)
                        return NULL;
                bufpos = nlh->properties_off;