From: Serge Hallyn Date: Mon, 10 Jun 2013 16:52:44 +0000 (-0500) Subject: lxc_stop: return success if api_shutdown succeeded X-Git-Tag: lxc-1.0.0.alpha1~1^2~157 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=54b79829e23e01998eeafb8156987937a894af3c;p=thirdparty%2Flxc.git lxc_stop: return success if api_shutdown succeeded I originally forgot to set ret = 0 if it succeeded, meaning that a simple 'lxc-stop -n container1' returns failure even though the stop succeeded. Signed-off-by: Serge Hallyn Acked-by: Stéphane Graber --- diff --git a/src/lxc/lxc_stop.c b/src/lxc/lxc_stop.c index 3d42d0e65..d7f8d7fdc 100644 --- a/src/lxc/lxc_stop.c +++ b/src/lxc/lxc_stop.c @@ -166,7 +166,8 @@ int main(int argc, char *argv[]) ret = c->wait(c, "STOPPED", -1) ? 0 : -1; else ret = -1; // fail - } + } else + ret = 0; out: lxc_container_put(c);