|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v3 6/6] xl: improve exit codes of domain creation related functions
On Fri, Apr 08, 2016 at 04:24:17AM +0200, Dario Faggioli wrote:
> by making them more consistent with other examples in xl.
>
> Signed-off-by: Dario Faggioli <dario.faggioli@xxxxxxxxxx>
> Signed-off-by: Harmandeep Kaur <write.harmandeep@xxxxxxxxx>
> ---
> Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
> Cc: Wei Liu <wei.liu2@xxxxxxxxxx>
> ---
> v3: In create_domain(), only deal with exit codes, internal returns
> need more work than what was being done in the original patch.
> Shorten changelog.
>
> v2: Add create_domain()
> Remove main_sharing()
> ---
> tools/libxl/xl_cmdimpl.c | 32 ++++++++++++++++----------------
> 1 file changed, 16 insertions(+), 16 deletions(-)
>
> diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
> index d2ad8c8..31e2f30 100644
> --- a/tools/libxl/xl_cmdimpl.c
> +++ b/tools/libxl/xl_cmdimpl.c
> @@ -2964,7 +2964,7 @@ static int create_domain(struct domain_create *dom_info)
> if (!json) {
> fprintf(stderr,
> "Failed to convert domain configuration to JSON\n");
> - exit(1);
> + exit(EXIT_FAILURE);
> }
> fputs(json, cfg_print_fh);
> free(json);
> @@ -3212,7 +3212,7 @@ out:
> * already happened in the parent.
> */
> if ( daemonize && !need_daemon )
> - exit(ret);
> + exit(EXIT_SUCCESS);
This is not entirely correct: ret can be non-zero here if I'm not
mistaken. Whether it is useful to exit with that value, I don't know.
Wei.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |