All of lore.kernel.org
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: Dario Faggioli <dario.faggioli@citrix.com>,
	xen-devel@lists.xenproject.org
Cc: Wei Liu <wei.liu2@citrix.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>,
	Ian Campbell <ian.campbell@citrix.com>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: Re: [PATCH] xl: log an error if libxl_cpupool_destroy() fails
Date: Fri, 23 Oct 2015 06:21:52 +0200	[thread overview]
Message-ID: <5629B5E0.4060600@suse.com> (raw)
In-Reply-To: <20151022171420.15122.92760.stgit@Solace.station>

On 10/22/2015 07:14 PM, Dario Faggioli wrote:
> In fact, right now, failing at destroying a cpupool is just
> not reported to the user in any explicit way. Log an error,
> as it is customary for xl in these cases.
>
> While there, take the chance to turn a couple of xl exit
> codes into EXIT_[SUCCESS|FAILURE], as discussed and agreed
> here:
>
>   http://lists.xenproject.org/archives/html/xen-devel/2015-03/msg01336.html
>   http://lists.xenproject.org/archives/html/xen-devel/2015-03/msg01341.html
>
> Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>

Reviewed-by: Juergen Gross <jgross@suse.com>

> ---
> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
> Cc: Ian Campbell <ian.campbell@citrix.com>
> Cc: Wei Liu <wei.liu2@citrix.com>
> Cc: Juergen Gross <jgross@suse.com>
> ---
>   tools/libxl/xl_cmdimpl.c |   10 ++++++----
>   1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
> index 365798b..5a5f959 100644
> --- a/tools/libxl/xl_cmdimpl.c
> +++ b/tools/libxl/xl_cmdimpl.c
> @@ -7581,13 +7581,15 @@ int main_cpupooldestroy(int argc, char **argv)
>       if (libxl_cpupool_qualifier_to_cpupoolid(ctx, pool, &poolid, NULL) ||
>           !libxl_cpupoolid_is_valid(ctx, poolid)) {
>           fprintf(stderr, "unknown cpupool '%s'\n", pool);
> -        return 1;
> +        return EXIT_FAILURE;
>       }
>
> -    if (libxl_cpupool_destroy(ctx, poolid))
> -        return 1;
> +    if (libxl_cpupool_destroy(ctx, poolid)) {
> +        fprintf(stderr, "Can't destroy cpupool '%s'\n", pool);
> +        return EXIT_FAILURE;
> +    }
>
> -    return 0;
> +    return EXIT_SUCCESS;
>   }
>
>   int main_cpupoolrename(int argc, char **argv)
>
>

  reply	other threads:[~2015-10-23  4:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-22 17:14 [PATCH] xl: log an error if libxl_cpupool_destroy() fails Dario Faggioli
2015-10-23  4:21 ` Juergen Gross [this message]
2015-10-23  8:43 ` Wei Liu
2015-10-23 14:09   ` Ian Campbell
2015-10-23 15:12     ` Dario Faggioli
2015-10-23 15:40       ` Ian Campbell
2015-10-23 16:07         ` Dario Faggioli

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=5629B5E0.4060600@suse.com \
    --to=jgross@suse.com \
    --cc=dario.faggioli@citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=wei.liu2@citrix.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.