[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 4/9] xl: Improve return and exit codes of main_console(), main_vncviewer() and main_dump_core().
Signed-off-by: Harmandeep Kaur <write.harmandeep@xxxxxxxxx> --- tools/libxl/xl_cmdimpl.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index 2092c80..e1b4286 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -3421,7 +3421,7 @@ int main_console(int argc, char **argv) type = LIBXL_CONSOLE_TYPE_SERIAL; else { fprintf(stderr, "console type supported are: pv, serial\n"); - return 2; + return EXIT_FAILURE; } break; case 'n': @@ -3435,7 +3435,7 @@ int main_console(int argc, char **argv) else libxl_console_exec(ctx, domid, num, type); fprintf(stderr, "Unable to attach console\n"); - return 1; + return EXIT_FAILURE; } int main_vncviewer(int argc, char **argv) @@ -3457,8 +3457,8 @@ int main_vncviewer(int argc, char **argv) domid = find_domain(argv[optind]); if (vncviewer(domid, autopass)) - return 1; - return 0; + return EXIT_FAILURE; + return EXIT_SUCCESS; } static void pcilist(uint32_t domid) @@ -4013,7 +4013,7 @@ static void core_dump_domain(uint32_t domid, const char *filename) int rc; rc=libxl_domain_core_dump(ctx, domid, filename, NULL); - if (rc) { fprintf(stderr,"core dump failed (rc=%d)\n",rc);exit(-1); } + if (rc) { fprintf(stderr,"core dump failed (rc=%d)\n",rc);exit(EXIT_FAILURE); } } #ifndef LIBXL_HAVE_NO_SUSPEND_RESUME @@ -4774,7 +4774,7 @@ int main_dump_core(int argc, char **argv) } core_dump_domain(find_domain(argv[optind]), argv[optind + 1]); - return 0; + return EXIT_SUCCESS; } int main_pause(int argc, char **argv) -- 2.5.0 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |