[lxc-devel] [PATCH] Init error_num to 1
Stéphane Graber
stgraber at ubuntu.com
Thu Nov 5 18:44:45 UTC 2015
Signed-off-by: Stéphane Graber <stgraber 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
More information about the lxc-devel
mailing list