[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 1/9] xl: Improve return and exit codes of memory related functions.
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 116363d..8f5a2f4 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -172,7 +172,7 @@ static uint32_t find_domain(const char *p) rc = libxl_domain_qualifier_to_domid(ctx, p, &domid); if (rc) { fprintf(stderr, "%s is an invalid domain identifier (rc=%d)\n", p, rc); - exit(2); + exit(EXIT_FAILURE); } common_domname = libxl_domid_to_name(ctx, domid); return domid; @@ -3275,7 +3275,7 @@ static int set_memory_max(uint32_t domid, const char *mem) memorykb = parse_mem_size_kb(mem); if (memorykb == -1) { fprintf(stderr, "invalid memory size: %s\n", mem); - exit(3); + exit(EXIT_FAILURE); } rc = libxl_domain_setmaxmem(ctx, domid, memorykb); @@ -3300,10 +3300,10 @@ int main_memmax(int argc, char **argv) rc = set_memory_max(domid, mem); if (rc) { fprintf(stderr, "cannot set domid %d static max memory to : %s\n", domid, mem); - return 1; + return EXIT_FAILURE; } - return 0; + return EXIT_SUCCESS; } static void set_memory_target(uint32_t domid, const char *mem) @@ -3313,7 +3313,7 @@ static void set_memory_target(uint32_t domid, const char *mem) memorykb = parse_mem_size_kb(mem); if (memorykb == -1) { fprintf(stderr, "invalid memory size: %s\n", mem); - exit(3); + exit(EXIT_FAILURE); } libxl_set_memory_target(ctx, domid, memorykb, 0, /* enforce */ 1); @@ -3333,7 +3333,7 @@ int main_memset(int argc, char **argv) mem = argv[optind + 1]; set_memory_target(domid, mem); - return 0; + return EXIT_SUCCESS; } static int cd_insert(uint32_t domid, const char *virtdev, char *phys) -- 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 |