]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/xen.git/commitdiff
xl: log an error if libxl_cpupool_destroy() fails
authorDario Faggioli <dario.faggioli@citrix.com>
Wed, 4 Nov 2015 10:48:24 +0000 (11:48 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Wed, 4 Nov 2015 15:09:50 +0000 (15:09 +0000)
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@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
tools/libxl/xl_cmdimpl.c

index 78048a1c722b05fd96e438d094cf698a29e2991d..03442e1d0ad8ec9c7a677f6c1f52e7aaca9c1cb2 100644 (file)
@@ -7582,8 +7582,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;
 }