mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
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.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user