All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dario Faggioli <dario.faggioli@citrix.com>
To: 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>,
	Juergen Gross <jgross@xxxxxxxx>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: [PATCH v2] xl: log an error if libxl_cpupool_destroy() fails
Date: Wed, 28 Oct 2015 17:43:51 +0100	[thread overview]
Message-ID: <20151028164351.16499.1030.stgit@Solace.station> (raw)

In fact, right now, failing at destroying a cpupool is just
not reported to the user in any explicit way.

Let's log an error, as it is customary for xl in these cases.

Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Reviewed-by: Juergen Gross <jgross@xxxxxxxx>
---
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>
---
Changes from v1:
 * avoid changing the return code to EXIT_SUCCESS/FAILURE;
   that is being taken care of in another series anyway.
---
 tools/libxl/xl_cmdimpl.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
index 646b281..09a6bd7 100644
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -7584,8 +7584,10 @@ int main_cpupooldestroy(int argc, char **argv)
         return 1;
     }
 
-    if (libxl_cpupool_destroy(ctx, poolid))
+    if (libxl_cpupool_destroy(ctx, poolid)) {
+        fprintf(stderr, "Can't destroy cpupool '%s'\n", pool);
         return 1;
+    }
 
     return 0;
 }

             reply	other threads:[~2015-10-28 16:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-28 16:43 Dario Faggioli [this message]
2015-10-28 16:51 ` [PATCH v2] xl: log an error if libxl_cpupool_destroy() fails Wei Liu
2015-11-03 17:08   ` Ian Campbell
2015-11-03 17:11     ` 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=20151028164351.16499.1030.stgit@Solace.station \
    --to=dario.faggioli@citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jgross@xxxxxxxx \
    --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.