chiark / gitweb /
Allow watch handle to be stored in the udevdb.
[elogind.git] / udev / lib / libudev-device-db-write.c
index 11e0ab5f60daaf6bc3892376405fe6a2629882a1..e96f3101c62a50df3892fd1810e8af82bc192440 100644 (file)
@@ -64,6 +64,8 @@ int udev_device_update_db(struct udev_device *udev_device)
                goto file;
        if (udev_device_get_event_timeout(udev_device) >= 0)
                goto file;
+       if (udev_device_get_watch_handle(udev_device) >= 0)
+               goto file;
        if (udev_device_get_devnode(udev_device) == NULL)
                goto out;
 
@@ -109,6 +111,8 @@ file:
                fprintf(f, "A:%u\n", udev_device_get_num_fake_partitions(udev_device));
        if (udev_device_get_ignore_remove(udev_device))
                fprintf(f, "R:%u\n", udev_device_get_ignore_remove(udev_device));
+       if (udev_device_get_watch_handle(udev_device) >= 0)
+               fprintf(f, "W:%u\n", udev_device_get_watch_handle(udev_device));
        udev_list_entry_foreach(list_entry, udev_device_get_properties_list_entry(udev_device)) {
                if (!udev_list_entry_get_flag(list_entry))
                        continue;