From: Kay Sievers Date: Thu, 16 Oct 2008 16:56:19 +0000 (+0200) Subject: libudev: monitor - export MAJOR/MINOR only if available X-Git-Tag: 174~1442 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3361a0f1105a2fe6000800431e8ef15293b41673;p=systemd libudev: monitor - export MAJOR/MINOR only if available --- diff --git a/udev/lib/libudev-monitor.c b/udev/lib/libudev-monitor.c index 382fbfac..d0f28849 100644 --- a/udev/lib/libudev-monitor.c +++ b/udev/lib/libudev-monitor.c @@ -367,7 +367,8 @@ struct udev_device *udev_monitor_receive_device(struct udev_monitor *udev_monito udev_device_unref(udev_device); return NULL; } - udev_device_set_devnum(udev_device, makedev(maj, min)); + if (maj > 0) + udev_device_set_devnum(udev_device, makedev(maj, min)); udev_device_set_info_loaded(udev_device); return udev_device; }