daandemeyer / rpms / systemd

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