[CRIU] [PATCH] parasite-syscall: Don't invert the sign of parasite return code

Cyrill Gorcunov gorcunov at openvz.org
Tue Nov 6 07:10:56 EST 2012


This sneaked during parasite error handling code rework.
When parasite returned negative error code we should not
invert it.

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 parasite-syscall.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/parasite-syscall.c b/parasite-syscall.c
index a60c84e..0675e2d 100644
--- a/parasite-syscall.c
+++ b/parasite-syscall.c
@@ -225,7 +225,7 @@ static int parasite_execute_by_pid(unsigned int cmd, struct parasite_ctl *ctl, p
 
 	ret = __parasite_execute(ctl, pid, &regs);
 	if (ret == 0)
-		ret = -(int)regs.ax;
+		ret = (int)regs.ax;
 
 	if (ret)
 		pr_err("Parasite exited with %d\n", ret);
-- 
1.7.7.6



More information about the CRIU mailing list