summaryrefslogtreecommitdiff
path: root/libudev/libudev-monitor.c
diff options
context:
space:
mode:
authorMarco d'Itri <md@linux.it>2010-07-19 10:56:37 +0200
committerKay Sievers <kay.sievers@vrfy.org>2010-07-19 10:56:37 +0200
commit9b6c6b56123670050b1dc5eb69ea1a9638bedd39 (patch)
treed5aaba067db266fdf4d38348b6671fcc588127c6 /libudev/libudev-monitor.c
parenta466c239a98045767c3aa7dfbf95306f36b9bf48 (diff)
log an error when a message from the wrong version of udevadm is ignored
Diffstat (limited to 'libudev/libudev-monitor.c')
-rw-r--r--libudev/libudev-monitor.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libudev/libudev-monitor.c b/libudev/libudev-monitor.c
index b3e5d5f348..a3789c4d13 100644
--- a/libudev/libudev-monitor.c
+++ b/libudev/libudev-monitor.c
@@ -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;