mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-23 17:34:00 +03:00
sd-device: make sd_device_get_is_initialized() not return -ENOENT
This commit is contained in:
parent
8924cbf34a
commit
591c186f2f
@ -1589,6 +1589,9 @@ _public_ int sd_device_get_is_initialized(sd_device *device) {
|
||||
assert_return(device, -EINVAL);
|
||||
|
||||
r = device_read_db(device);
|
||||
if (r == -ENOENT)
|
||||
/* The device may be already removed or renamed. */
|
||||
return false;
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user