From: Stéphane Graber Date: Thu, 5 Nov 2015 18:44:30 +0000 (-0500) Subject: Init error_num to 1 X-Git-Tag: lxc-2.0.0.beta1~75 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=120146b993a576617d785ebb52157bb00d2e91a4;p=thirdparty%2Flxc.git Init error_num to 1 Signed-off-by: Stéphane Graber Acked-by: Serge E. Hallyn --- diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c index 42e23e736..eccc154fc 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;