[lxc-devel] [PATCH] lxc_stop: return success if api_shutdown succeeded
Stéphane Graber
stgraber at ubuntu.com
Mon Jun 10 17:09:34 UTC 2013
On Mon, Jun 10, 2013 at 11:52:44AM -0500, Serge Hallyn wrote:
>
> 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 <serge.hallyn at ubuntu.com>
Acked-by: Stéphane Graber <stgraber at ubuntu.com>
> ---
> src/lxc/lxc_stop.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/lxc/lxc_stop.c b/src/lxc/lxc_stop.c
> index 3d42d0e..d7f8d7f 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);
> --
> 1.8.1.2
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Windows:
>
> Build for Windows Store.
>
> http://p.sf.net/sfu/windows-dev2dev
> _______________________________________________
> Lxc-devel mailing list
> Lxc-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lxc-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20130610/aa80fa50/attachment.pgp>
More information about the lxc-devel
mailing list