Commit 54b79829 by Serge Hallyn

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: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com> Acked-by: 's avatarStéphane Graber <stgraber@ubuntu.com>
parent 6e46cfcb
...@@ -166,7 +166,8 @@ int main(int argc, char *argv[]) ...@@ -166,7 +166,8 @@ int main(int argc, char *argv[])
ret = c->wait(c, "STOPPED", -1) ? 0 : -1; ret = c->wait(c, "STOPPED", -1) ? 0 : -1;
else else
ret = -1; // fail ret = -1; // fail
} } else
ret = 0;
out: out:
lxc_container_put(c); lxc_container_put(c);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment