From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: [PATCH v3] xl: log an error if libxl_cpupool_destroy() fails Date: Wed, 04 Nov 2015 11:48:24 +0100 Message-ID: <20151104104824.5761.16494.stgit@Solace.station> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZtvcD-0001lQ-NH for xen-devel@lists.xenproject.org; Wed, 04 Nov 2015 10:48:29 +0000 Received: by wmff134 with SMTP id f134so37992322wmf.0 for ; Wed, 04 Nov 2015 02:48:27 -0800 (PST) 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: Juergen Gross , Ian Jackson , Wei Liu , Ian Campbell , 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 Acked-by: Wei Liu --- Cc: Ian Jackson Cc: Stefano Stabellini Cc: Ian Campbell --- Changes from v2: * rebased on top of staging; * fixed Juergen's email address 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 2756d2f..5469735 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -7581,8 +7581,10 @@ int main_cpupooldestroy(int argc, char **argv) return EXIT_FAILURE; } - if (libxl_cpupool_destroy(ctx, poolid)) + if (libxl_cpupool_destroy(ctx, poolid)) { + fprintf(stderr, "Can't destroy cpupool '%s'\n", pool); return EXIT_FAILURE; + } return EXIT_SUCCESS; }