From 378f61ebef6d29efce8512402a73df880c7d960c Mon Sep 17 00:00:00 2001 From: Tom Gundersen Date: Wed, 22 Apr 2015 19:01:50 +0200 Subject: libudev-device: fix lazy loading of devlinks, properties and tags If the underlying device has not read in the properties yet, the generation will be 0, so make sure we trigger the reading at least once. --- src/libudev/libudev-device-internal.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/libudev/libudev-device-internal.h') diff --git a/src/libudev/libudev-device-internal.h b/src/libudev/libudev-device-internal.h index 3f93fda545..aa36b8cb12 100644 --- a/src/libudev/libudev-device-internal.h +++ b/src/libudev/libudev-device-internal.h @@ -47,6 +47,9 @@ struct udev_device { uint64_t tags_generation; struct udev_list devlinks; uint64_t devlinks_generation; + bool properties_read:1; + bool tags_read:1; + bool devlinks_read:1; struct udev_list sysattrs; bool sysattrs_read; }; -- cgit v1.2.3-54-g00ecf