mirror of
https://github.com/systemd/systemd.git
synced 2024-12-25 01:34:28 +03:00
udev-util: simplify device_is_renaming() error handling
This commit is contained in:
parent
6d3702f97c
commit
b9daaedbb9
@ -288,10 +288,12 @@ int device_is_renaming(sd_device *dev) {
|
||||
assert(dev);
|
||||
|
||||
r = sd_device_get_property_value(dev, "ID_RENAMING", NULL);
|
||||
if (r < 0 && r != -ENOENT)
|
||||
if (r == -ENOENT)
|
||||
return false;
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
return r >= 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool device_for_action(sd_device *dev, DeviceAction action) {
|
||||
|
Loading…
Reference in New Issue
Block a user