From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: [PATCH v2] xl: log an error if libxl_cpupool_destroy() fails Date: Wed, 28 Oct 2015 17:43:51 +0100 Message-ID: <20151028164351.16499.1030.stgit@Solace.station> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZrTpM-00015f-Au for xen-devel@lists.xenproject.org; Wed, 28 Oct 2015 16:43:56 +0000 Received: by wijp11 with SMTP id p11so262691231wij.0 for ; Wed, 28 Oct 2015 09:43:54 -0700 (PDT) List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Wei Liu , Ian Jackson , Ian Campbell , Juergen Gross , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org 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 Reviewed-by: Juergen Gross --- Cc: Ian Jackson Cc: Stefano Stabellini Cc: Ian Campbell Cc: Wei Liu --- 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; }