chiark / gitweb /
libudev: monitor - export MAJOR/MINOR only if available
authorKay Sievers <kay.sievers@vrfy.org>
Thu, 16 Oct 2008 16:56:19 +0000 (18:56 +0200)
committerKay Sievers <kay.sievers@vrfy.org>
Thu, 16 Oct 2008 16:56:19 +0000 (18:56 +0200)
udev/lib/libudev-monitor.c

index 382fbfac5ffbca49e1f704278672a7d81b21701c..d0f28849aa11bf126b1600e1e0744b06a893d66e 100644 (file)
@@ -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;
 }