ryantimwilson / rpms / systemd

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