xl: log an error if libxl_cpupool_destroy() fails
PATCH v3 1/1 xl: log an error if libxl_cpupool_destroy() fails
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 <[email protected]>
Reviewed-by Juergen Gross <[email protected]>
Acked-by Wei Liu <[email protected]>
---
Cc: Ian Jackson <[email protected]>
Cc: Stefano Stabellini <[email protected]>
Cc: Ian Campbell <[email protected]>
---
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(-)
tools/libxl/xl_cmdimpl.c +3 -1
@@ -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 ; }
Quoted 8 lines · Dario Faggioli
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 <[email protected]>Reviewed-by Juergen Gross <[email protected]>Acked-by Wei Liu <[email protected]>
Applied (cleanly) thanks.