mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
p2v: Print an error if gtk_init_check fails.
Apparently gtk_init_check doesn't (always?) print an error message when it returns false, so virt-p2v just exits without any message. This was observed on RHEL 6 when $DISPLAY was not set.
This commit is contained in:
@@ -197,9 +197,13 @@ main (int argc, char *argv[])
|
||||
kernel_configuration (config, cmdline, cmdline_source);
|
||||
else {
|
||||
gui:
|
||||
if (!gui_possible)
|
||||
/* Gtk has already printed an error. */
|
||||
if (!gui_possible) {
|
||||
fprintf (stderr,
|
||||
_("%s: gtk_init_check returned false, indicating that\n"
|
||||
"a GUI is not possible on this host. Check X11, $DISPLAY etc.\n"),
|
||||
guestfs_int_program_name);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
gui_application (config);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user