diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2010-12-14 14:18:32 +0100 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2010-12-14 14:18:32 +0100 |
commit | 48a0170b111b55e961be769d2cc4890511bcd991 (patch) | |
tree | 45cc479d03b844d778217523e30dd962daf04076 /libudev/libudev-device-private.c | |
parent | ff0e1f4e5d897a0ddbf365e920c0e28a6657abaa (diff) |
libudev: enumerate - allow to filter-out not-already-initialized devices
Diffstat (limited to 'libudev/libudev-device-private.c')
-rw-r--r-- | libudev/libudev-device-private.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libudev/libudev-device-private.c b/libudev/libudev-device-private.c index 406d8704f5..d1df45ee74 100644 --- a/libudev/libudev-device-private.c +++ b/libudev/libudev-device-private.c @@ -114,7 +114,9 @@ int udev_device_update_db(struct udev_device *udev_device) util_strscpyl(filename, sizeof(filename), udev_get_dev_path(udev), "/.udev/db/", id, NULL); /* do not store anything for otherwise empty devices */ - if (!has_info && udev_device_get_devnode(udev_device) == NULL) { + if (!has_info && + major(udev_device_get_devnum(udev_device)) == 0 && + udev_device_get_ifindex(udev_device) == 0) { unlink(filename); return 0; } |