summaryrefslogtreecommitdiffstats
path: root/rescue
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2011-08-23 16:41:07 +0100
committerRichard W.M. Jones <rjones@redhat.com>2011-08-23 16:41:07 +0100
commit00fef9eed6a53e10a975814beef775483ff0b3dd (patch)
tree59690a71bcaa58ce5a826783df32cf4c40b5e1b0 /rescue
parent9bab154d48e367702b65852c3c822341b474ffd2 (diff)
downloadlibguestfs-00fef9eed6a53e10a975814beef775483ff0b3dd.tar.gz
libguestfs-00fef9eed6a53e10a975814beef775483ff0b3dd.tar.xz
libguestfs-00fef9eed6a53e10a975814beef775483ff0b3dd.zip
rescue: Ignore errno after guestfs_launch.
errno is pretty much random on the error path back from guestfs_launch so there is nothing useful to be gained by checking it. We could do with a better way to detect if appliance launch failed.
Diffstat (limited to 'rescue')
-rw-r--r--rescue/virt-rescue.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/rescue/virt-rescue.c b/rescue/virt-rescue.c
index dd033aa5..7c8a57b3 100644
--- a/rescue/virt-rescue.c
+++ b/rescue/virt-rescue.c
@@ -294,16 +294,6 @@ main (int argc, char *argv[])
/* We expect launch to fail, so ignore the return value. */
ignore_value (guestfs_launch (g));
- /* launch() expects guestfsd to start. However, virt-rescue doesn't
- * run guestfsd, so this will always fail with ECHILD when the
- * appliance exits unexpectedly.
- */
- if (errno != ECHILD) {
- fprintf (stderr, "%s: %s\n", program_name, guestfs_last_error (g));
- guestfs_close (g);
- exit (EXIT_FAILURE);
- }
-
guestfs_close (g);
exit (EXIT_SUCCESS);