diff options
author | Thomas Hindoe Paaboel Andersen <phomes@gmail.com> | 2014-09-15 22:55:36 +0200 |
---|---|---|
committer | Thomas Hindoe Paaboel Andersen <phomes@gmail.com> | 2014-09-16 21:31:15 +0200 |
commit | 9169b9a8cc43046f92a4c5c85b0b3fe9ca0fb429 (patch) | |
tree | 162c86288cdd0079b0a936849f0852bfe774abfd /src/libsystemd-terminal | |
parent | b49ffb29ed902f173852707652b3e3c9c303cebb (diff) |
terminal: sd_bus_error_get_errno returns positive errno
The 3 calls to sd_bus_error_get_errno appear to expect a negative
return value.
This patch negates the returned value so it matches the other error
cases in the 3 functions where sd_bus_error_get_errno is used.
Diffstat (limited to 'src/libsystemd-terminal')
-rw-r--r-- | src/libsystemd-terminal/sysview.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsystemd-terminal/sysview.c b/src/libsystemd-terminal/sysview.c index 2083f5a7e0..fde87d1117 100644 --- a/src/libsystemd-terminal/sysview.c +++ b/src/libsystemd-terminal/sysview.c @@ -263,7 +263,7 @@ static int session_take_control_fn(sd_bus *bus, log_debug("sysview: %s: TakeControl failed: %s: %s", session->name, e->name, e->message); - error = sd_bus_error_get_errno(e); + error = -sd_bus_error_get_errno(e); } else { session->has_control = true; error = 0; @@ -1195,7 +1195,7 @@ static int context_ld_list_seats_fn(sd_bus *bus, log_debug("sysview: ListSeats on logind failed: %s: %s", error->name, error->message); - return sd_bus_error_get_errno(error); + return -sd_bus_error_get_errno(error); } r = sd_bus_message_enter_container(reply, 'a', "(so)"); @@ -1247,7 +1247,7 @@ static int context_ld_list_sessions_fn(sd_bus *bus, log_debug("sysview: ListSessions on logind failed: %s: %s", error->name, error->message); - return sd_bus_error_get_errno(error); + return -sd_bus_error_get_errno(error); } r = sd_bus_message_enter_container(reply, 'a', "(susso)"); |