[lxc-devel] [PATCH] Init error_num to 1

Serge Hallyn serge.hallyn at ubuntu.com
Thu Nov 5 18:50:48 UTC 2015


Quoting Stéphane Graber (stgraber at ubuntu.com):
> Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>

Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>

> ---
>  src/lxc/lxccontainer.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c
> index 42e23e7..eccc154 100644
> --- a/src/lxc/lxccontainer.c
> +++ b/src/lxc/lxccontainer.c
> @@ -637,6 +637,10 @@ static bool do_lxcapi_start(struct lxc_container *c, int useinit, char * const a
>  	/* container exists */
>  	if (!c)
>  		return false;
> +
> +	/* If anything fails before we set error_num, we want an error in there */
> +	c->error_num = 1;
> +
>  	/* container has been setup */
>  	if (!c->lxc_conf)
>  		return false;
> -- 
> 1.9.1
> 
> _______________________________________________
> lxc-devel mailing list
> lxc-devel at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-devel


More information about the lxc-devel mailing list