daandemeyer / rpms / systemd

Forked from rpms/systemd 2 years ago
Clone
923a60
From 6e2893aa4e1d6471b174e56c5132da31f890d620 Mon Sep 17 00:00:00 2001
923a60
From: David Herrmann <dh.herrmann@gmail.com>
923a60
Date: Tue, 16 Dec 2014 16:14:48 +0100
923a60
Subject: [PATCH] console: fix error-code inversion
923a60
923a60
The error-code propagated via sysview is always negative. Avoid
923a60
multiplying by -1 before returning it. Otherwise, we will return >0
923a60
instead of <0, which will not be detected as error by sysview-core.
923a60
923a60
(cherry picked from commit 84c3561c58dd992b339afe5bb4c41971a2ebc486)
923a60
---
923a60
 src/console/consoled-manager.c | 2 +-
923a60
 1 file changed, 1 insertion(+), 1 deletion(-)
923a60
923a60
diff --git a/src/console/consoled-manager.c b/src/console/consoled-manager.c
923a60
index 9dd62f04a0..25de0a218f 100644
923a60
--- a/src/console/consoled-manager.c
923a60
+++ b/src/console/consoled-manager.c
923a60
@@ -228,7 +228,7 @@ static int manager_sysview_session_control(Manager *m, sysview_event *event) {
923a60
                                 sysview_session_get_name(session));
923a60
                 session_free(s);
923a60
                 sysview_session_set_userdata(session, NULL);
923a60
-                return -error;
923a60
+                return error;
923a60
         }
923a60
 
923a60
         return 0;