k = sd_device_new_from_syspath(&device, syspath);
if (k < 0) {
- log_debug_errno(k, "device-enumerator: failed to create device from syspath %s: %m", syspath);
- r = k;
+ if (k != -ENODEV)
+ /* this is necessarily racey, so ignore missing devices */
+ r = k;
+
continue;
}
k = sd_device_new_from_device_id(&device, dent->d_name);
if (k < 0) {
- r = k;
+ if (k != -ENODEV)
+ /* this is necessarily racy, so ignore missing devices */
+ r = k;
+
continue;
}
int r;
r = sd_device_new_from_syspath(&device, path);
- if (r == -ENOENT)
+ if (r == -ENODEV)
+ /* this is necessarily racy, so ignore missing devices */
return 0;
else if (r < 0)
return r;