From: Harmandeep Kaur <write.harmandeep@gmail.com>
To: xen-devel@lists.xenproject.org
Cc: wei.liu2@citrix.com, ian.campbell@citrix.com,
stefano.stabellini@eu.citrix.com, dario.faggioli@citrix.com,
ian.jackson@eu.citrix.com,
Harmandeep Kaur <write.harmandeep@gmail.com>
Subject: [PATCH 8/9] xl: Improve return and exit codes main_button_press(), main_trigger(), main_remus() and related functions.
Date: Wed, 24 Feb 2016 18:23:26 +0530 [thread overview]
Message-ID: <1456318407-3635-9-git-send-email-write.harmandeep@gmail.com> (raw)
In-Reply-To: <1456318407-3635-1-git-send-email-write.harmandeep@gmail.com>
Signed-off-by: Harmandeep Kaur <write.harmandeep@gmail.com>
---
tools/libxl/xl_cmdimpl.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
index f7f7d7f..9e0a467 100644
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -374,7 +374,7 @@ static void xvasprintf(char **strp, const char *fmt, va_list ap)
int r = vasprintf(strp, fmt, ap);
if (r == -1) {
perror("asprintf failed");
- exit(-ERROR_FAIL);
+ exit(EXIT_FAILURE);
}
}
@@ -5216,7 +5216,7 @@ static void button_press(uint32_t domid, const char *b)
trigger = LIBXL_TRIGGER_SLEEP;
} else {
fprintf(stderr, "%s is an invalid button identifier\n", b);
- exit(2);
+ exit(EXIT_FAILURE);
}
libxl_send_trigger(ctx, domid, trigger, 0);
@@ -6398,7 +6398,7 @@ int main_trigger(int argc, char **argv)
trigger_name = argv[optind++];
if (libxl_trigger_from_string(trigger_name, &trigger)) {
fprintf(stderr, "Invalid trigger \"%s\"\n", trigger_name);
- return -1;
+ return EXIT_FAILURE;
}
if (argv[optind]) {
@@ -6410,7 +6410,7 @@ int main_trigger(int argc, char **argv)
libxl_send_trigger(ctx, domid, trigger, vcpuid);
- return 0;
+ return EXIT_SUCCESS;
}
@@ -8064,7 +8064,7 @@ int main_remus(int argc, char **argv)
send_fd = open("/dev/null", O_RDWR, 0644);
if (send_fd < 0) {
perror("failed to open /dev/null");
- exit(-1);
+ exit(EXIT_FAILURE);
}
} else {
@@ -8081,7 +8081,7 @@ int main_remus(int argc, char **argv)
if (!config_len) {
fprintf(stderr, "No config file stored for running domain and "
"none supplied - cannot start remus.\n");
- exit(1);
+ exit(EXIT_FAILURE);
}
child = create_migration_child(rune, &send_fd, &recv_fd);
@@ -8102,7 +8102,7 @@ int main_remus(int argc, char **argv)
if (libxl_domain_info(ctx, 0, domid)) {
fprintf(stderr, "Remus: Primary domain has been destroyed.\n");
close(send_fd);
- return 0;
+ return EXIT_SUCCESS;
}
/* If we are here, it means remus setup/domain suspend/backup has
@@ -8117,7 +8117,7 @@ int main_remus(int argc, char **argv)
}
close(send_fd);
- return -ERROR_FAIL;
+ return EXIT_FAILURE;
}
#endif
--
2.5.0
next prev parent reply other threads:[~2016-02-24 12:54 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-24 12:53 [PATCH 0/9] xl: convert exit codes related to domain subcommands to EXIT_[SUCCESS|FAILURE] Harmandeep Kaur
2016-02-24 12:53 ` [PATCH 1/9] xl: Improve return and exit codes of memory related functions Harmandeep Kaur
2016-02-24 13:55 ` Olaf Hering
2016-02-24 14:30 ` Dario Faggioli
2016-02-25 11:10 ` Dario Faggioli
2016-02-24 12:53 ` [PATCH 2/9] xl: Improve return and exit codes of restore and save " Harmandeep Kaur
2016-03-02 18:02 ` Dario Faggioli
2016-02-24 12:53 ` [PATCH 3/9] xl: Improve return and exit codes of migrate " Harmandeep Kaur
2016-03-02 17:53 ` Dario Faggioli
2016-02-24 12:53 ` [PATCH 4/9] xl: Improve return and exit codes of main_console(), main_vncviewer() and main_dump_core() Harmandeep Kaur
2016-02-25 11:33 ` Dario Faggioli
[not found] ` <CAPtdW15OwR5WmAnyr9+KqEbTFsPwX2d9_CzS945gzoLQyPBtOA@mail.gmail.com>
2016-03-08 14:16 ` Dario Faggioli
2016-02-24 12:53 ` [PATCH 5/9] xl: Improve return and exit codes of main_pause(), main_unpause(), main_destroy() and main_shutdown_or_reboot() related functions Harmandeep Kaur
2016-03-02 16:59 ` Dario Faggioli
2016-02-24 12:53 ` [PATCH 6/9] xl: Improve return and exit codes of main_list() and main_vm_list() " Harmandeep Kaur
2016-03-02 17:37 ` Dario Faggioli
2016-02-24 12:53 ` [PATCH 7/9] xl: Improve return and exit codes of main_create(), main_config_update(), main_sharing(), main_rename() and " Harmandeep Kaur
2016-03-02 17:29 ` Dario Faggioli
2016-02-24 12:53 ` Harmandeep Kaur [this message]
2016-02-25 11:26 ` [PATCH 8/9] xl: Improve return and exit codes main_button_press(), main_trigger(), main_remus() " Dario Faggioli
2016-02-24 12:53 ` [PATCH 9/9] xl: Improve return codes of main_domid(), main_domname() and main_sysrq() " Harmandeep Kaur
2016-02-25 11:18 ` Dario Faggioli
2016-02-25 10:57 ` [PATCH 0/9] xl: convert exit codes related to domain subcommands to EXIT_[SUCCESS|FAILURE] Dario Faggioli
2016-03-02 18:05 ` Dario Faggioli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1456318407-3635-9-git-send-email-write.harmandeep@gmail.com \
--to=write.harmandeep@gmail.com \
--cc=dario.faggioli@citrix.com \
--cc=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.