summaryrefslogtreecommitdiffstats
path: root/test-tool
diff options
context:
space:
mode:
authorRichard Jones <rjones@trick.home.annexia.org>2009-09-21 11:52:53 +0100
committerRichard Jones <rjones@trick.home.annexia.org>2009-09-21 12:01:51 +0100
commit8869adf1e811d894088dbb0f371edc23299005c8 (patch)
tree6c0229f90c81f03f6e989cdd57e20b114a437d41 /test-tool
parent62b322872543c2ec069ac4fb0103ab758f587cef (diff)
downloadlibguestfs-8869adf1e811d894088dbb0f371edc23299005c8.tar.gz
libguestfs-8869adf1e811d894088dbb0f371edc23299005c8.tar.xz
libguestfs-8869adf1e811d894088dbb0f371edc23299005c8.zip
Remove guestfs_wait_ready (turn it into a no-op).
This commit changes guestfs_launch so that it both launches the appliance and waits until it is ready (ie. the daemon communicates back to us). Since we removed the pretence that we could implement a low-level asynchronous API, the need to call launch() followed by wait_ready() has looked a bit silly. Now guestfs_wait_ready() is basically a no-op. It is left in the API for backwards compatibility. Any calls to guestfs_wait_ready() can be removed from client code.
Diffstat (limited to 'test-tool')
-rw-r--r--test-tool/test-tool.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/test-tool/test-tool.c b/test-tool/test-tool.c
index 508c31aa..c1a3de7c 100644
--- a/test-tool/test-tool.c
+++ b/test-tool/test-tool.c
@@ -186,20 +186,14 @@ main (int argc, char *argv[])
printf ("guestfs_get_verbose: %d\n", guestfs_get_verbose (g));
/* Launch the guest handle. */
- if (guestfs_launch (g) == -1) {
- fprintf (stderr,
- _("libguestfs-test-tool: failed to launch appliance\n"));
- exit (1);
- }
-
printf ("Launching appliance, timeout set to %d seconds.\n", timeout);
fflush (stdout);
alarm (timeout);
- if (guestfs_wait_ready (g) == -1) {
+ if (guestfs_launch (g) == -1) {
fprintf (stderr,
- _("libguestfs-test-tool: failed or timed out in 'wait_ready'\n"));
+ _("libguestfs-test-tool: failed to launch appliance\n"));
exit (1);
}