mirror of
https://github.com/systemd/systemd.git
synced 2025-02-04 21:47:31 +03:00
bus: compare to negative errno
This commit is contained in:
parent
23ea3dab15
commit
11ea5a4a7f
@ -161,7 +161,7 @@ int bus_error_from_errno(sd_bus_error *e, int error) {
|
||||
|
||||
if (error == -ENOMEM)
|
||||
sd_bus_error_set_const(e, "org.freedesktop.DBus.Error.NoMemory", strerror(-error));
|
||||
else if (error == -EPERM || error == EACCES)
|
||||
else if (error == -EPERM || error == -EACCES)
|
||||
sd_bus_error_set_const(e, "org.freedesktop.DBus.Error.AccessDenied", strerror(-error));
|
||||
else
|
||||
sd_bus_error_set_const(e, "org.freedesktop.DBus.Error.Failed", "Operation failed");
|
||||
|
Loading…
x
Reference in New Issue
Block a user