[lxc-users] [lxc-devel] [PATCH 1/1] lxc_start: return 1 not -1 on error
Stéphane Graber
stgraber at ubuntu.com
Mon Apr 7 15:16:13 UTC 2014
On Mon, Apr 07, 2014 at 10:08:24AM -0500, Serge Hallyn wrote:
> So that exit status doesn't show up as 255.
>
> Reported-by: Andrey Khozov <avkhozov at googlemail.com>
> Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>
Acked-by: Stéphane Graber <stgraber at ubuntu.com>
> ---
> src/lxc/lxc_start.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/lxc/lxc_start.c b/src/lxc/lxc_start.c
> index d9a5694..157bea9 100644
> --- a/src/lxc/lxc_start.c
> +++ b/src/lxc/lxc_start.c
> @@ -201,7 +201,7 @@ Options :\n\
>
> int main(int argc, char *argv[])
> {
> - int err = -1;
> + int err = 1;
> struct lxc_conf *conf;
> char *const *args;
> char *rcfile = NULL;
> @@ -328,7 +328,7 @@ int main(int argc, char *argv[])
> if (my_args.close_all_fds)
> c->want_close_all_fds(c, true);
>
> - err = c->start(c, 0, args) ? 0 : -1;
> + err = c->start(c, 0, args) ? 0 : 1;
> out:
> lxc_container_put(c);
> return err;
> --
> 1.9.1
>
> _______________________________________________
> lxc-devel mailing list
> lxc-devel at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-devel
--
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20140407/ccd060fd/attachment.sig>
More information about the lxc-users
mailing list