]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-device: do not recreate the same symlinks which store watch handle
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 12 Sep 2021 06:47:08 +0000 (15:47 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 13 Sep 2021 02:54:56 +0000 (11:54 +0900)
src/libsystemd/sd-device/device-private.c

index 16a2e9e1e43e8fb93629734c210ebe723b8d134f..37eda23a5f66c40ce2dc51fc3aa9e83cc15cc13d 100644 (file)
@@ -680,7 +680,7 @@ int device_set_watch_handle(sd_device *device, int wd) {
 
         assert(device);
 
-        if (wd >= 0 && wd == device->watch_handle)
+        if (wd >= 0 && wd == device_get_watch_handle(device))
                 return 0;
 
         device_remove_watch_handle(device);