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

Cyrill Gorcunov gorcunov at openvz.org
Tue Nov 6 07:25:49 EST 2012


On Tue, Nov 06, 2012 at 04:17:11PM +0400, Pavel Emelyanov wrote:
> 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;
> 
> Every single caller of parasite_ececute() checks for ret to be less than zero for
> error. Are they broken now, or will be broken after your patch?

They are broken as far as I can tell, but letme re-check prcisely.


More information about the CRIU mailing list