On Thu, May 16, 2013 at 08:47:19PM +0400, Andrey Wagin wrote:
> 2013/5/16 Glauber Costa <glom...@parallels.com>:
> > On 05/16/2013 04:14 PM, Andrey Vagin wrote:
> >> +     ret = ct_env_create_real(arg);
> >> +     if (ret < 0)
> >>               return VZ_RESOURCE_ERROR;
> >> -     }
> >
> > Isn't it better to just keep the return values intact in create_real,
> > and then return them as is if ret != 0 ?
> 
> It returns PID of the init process. VZ_RESOURCE_ERROR is positive too

ct_env_create_real can return a negative value in a error case and
it can be inverted in cr_env_create

        ret = ct_env_create_real(arg);
        if (ret < 0)
                return -ret;

> 
> >
> _______________________________________________
> CRIU mailing list
> c...@openvz.org
> https://lists.openvz.org/mailman/listinfo/criu
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to