From: Wei Liu <wei.liu2@citrix.com>
To: Dario Faggioli <dario.faggioli@citrix.com>
Cc: xen-devel@lists.xenproject.org,
Ian Jackson <ian.jackson@eu.citrix.com>,
Wei Liu <wei.liu2@citrix.com>,
Harmandeep Kaur <write.harmandeep@gmail.com>
Subject: Re: [PATCH v3 6/6] xl: improve exit codes of domain creation related functions
Date: Fri, 8 Apr 2016 13:40:49 +0100 [thread overview]
Message-ID: <20160408124049.GD32191@citrix.com> (raw)
In-Reply-To: <20160408022416.9058.81418.stgit@Solace.fritz.box>
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@citrix.com>
> Signed-off-by: Harmandeep Kaur <write.harmandeep@gmail.com>
> ---
> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> Cc: Wei Liu <wei.liu2@citrix.com>
> ---
> 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@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-04-08 12:39 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-08 2:23 [PATCH v3 0/6] xl: convert exit codes related to domain subcommands to EXIT_[SUCCESS|FAILURE] Dario Faggioli
2016-04-08 2:23 ` [PATCH v3 1/6] xl: improve return and exit codes of memory related functions Dario Faggioli
2016-04-08 9:58 ` Dario Faggioli
2016-04-08 12:40 ` Wei Liu
2016-04-08 2:23 ` [PATCH v3 2/6] xl: improve exit codes of save/restore and migration functions Dario Faggioli
2016-04-08 12:40 ` Wei Liu
2016-04-08 2:23 ` [PATCH v3 3/6] xl: improve exit codes of some of the domain handling functions Dario Faggioli
2016-04-08 12:40 ` Wei Liu
2016-04-08 2:23 ` [PATCH v3 4/6] xl : improve exit codes of debug related functions Dario Faggioli
2016-04-08 12:40 ` Wei Liu
2016-04-08 2:24 ` [PATCH v3 5/6] xl: make return type of create_domain() more consistent Dario Faggioli
2016-04-08 12:40 ` Wei Liu
2016-04-08 2:24 ` [PATCH v3 6/6] xl: improve exit codes of domain creation related functions Dario Faggioli
2016-04-08 12:40 ` Wei Liu [this message]
2016-04-08 14:08 ` [PATCH v3 0/6] xl: convert exit codes related to domain subcommands to EXIT_[SUCCESS|FAILURE] Ian Jackson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160408124049.GD32191@citrix.com \
--to=wei.liu2@citrix.com \
--cc=dario.faggioli@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=write.harmandeep@gmail.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).