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

Pavel Emelyanov xemul at parallels.com
Tue Nov 6 07:57:08 EST 2012


On 11/06/2012 04:10 PM, Cyrill Gorcunov wrote:
> 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);
> 


Applied


More information about the CRIU mailing list