mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
launch: switch from -nographic to -display none
The latter is a better way to disable the qemu display output as we need to, without enabling extra devices (which are disabled already, anyway). Also, related to the change above, ban the -display parameter from the ones that can be supplied by the user.
This commit is contained in:
committed by
Richard W.M. Jones
parent
c89ffbc152
commit
7a41f5c126
@@ -797,16 +797,16 @@ working.
|
||||
AC_MSG_FAILURE([$QEMU version must be >= 1.0.])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([that $QEMU -nographic -machine accel=kvm:tcg -device ? works])
|
||||
if $QEMU -nographic -machine accel=kvm:tcg -device \? >&AS_MESSAGE_LOG_FD 2>&1; then
|
||||
AC_MSG_CHECKING([that $QEMU -display none -machine accel=kvm:tcg -device ? works])
|
||||
if $QEMU -display none -machine accel=kvm:tcg -device \? >&AS_MESSAGE_LOG_FD 2>&1; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_FAILURE([$QEMU -nographic -machine accel=kvm:tcg -device ? doesn't work.])
|
||||
AC_MSG_FAILURE([$QEMU -display none -machine accel=kvm:tcg -device ? doesn't work.])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([for virtio-serial support in $QEMU])
|
||||
if $QEMU $QEMU_OPTIONS -nographic -machine accel=kvm:tcg -device \? 2>&1 | grep -sq virtio-serial; then
|
||||
if $QEMU $QEMU_OPTIONS -display none -machine accel=kvm:tcg -device \? 2>&1 | grep -sq virtio-serial; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
|
||||
@@ -349,7 +349,8 @@ launch_direct (guestfs_h *g, void *datav, const char *arg)
|
||||
if (qemu_supports (g, data, "-nodefaults"))
|
||||
ADD_CMDLINE ("-nodefaults");
|
||||
|
||||
ADD_CMDLINE ("-nographic");
|
||||
ADD_CMDLINE ("-display");
|
||||
ADD_CMDLINE ("none");
|
||||
|
||||
#ifdef MACHINE_TYPE
|
||||
ADD_CMDLINE ("-M");
|
||||
@@ -918,7 +919,8 @@ test_qemu (guestfs_h *g, struct backend_direct_data *data)
|
||||
data->qemu_devices = NULL;
|
||||
|
||||
guestfs___cmd_add_arg (cmd1, g->hv);
|
||||
guestfs___cmd_add_arg (cmd1, "-nographic");
|
||||
guestfs___cmd_add_arg (cmd1, "-display");
|
||||
guestfs___cmd_add_arg (cmd1, "none");
|
||||
guestfs___cmd_add_arg (cmd1, "-help");
|
||||
guestfs___cmd_set_stdout_callback (cmd1, read_all, &data->qemu_help,
|
||||
CMD_STDOUT_FLAG_WHOLE_BUFFER);
|
||||
@@ -927,7 +929,8 @@ test_qemu (guestfs_h *g, struct backend_direct_data *data)
|
||||
goto error;
|
||||
|
||||
guestfs___cmd_add_arg (cmd2, g->hv);
|
||||
guestfs___cmd_add_arg (cmd2, "-nographic");
|
||||
guestfs___cmd_add_arg (cmd2, "-display");
|
||||
guestfs___cmd_add_arg (cmd2, "none");
|
||||
guestfs___cmd_add_arg (cmd2, "-version");
|
||||
guestfs___cmd_set_stdout_callback (cmd2, read_all, &data->qemu_version,
|
||||
CMD_STDOUT_FLAG_WHOLE_BUFFER);
|
||||
@@ -938,7 +941,8 @@ test_qemu (guestfs_h *g, struct backend_direct_data *data)
|
||||
parse_qemu_version (g, data);
|
||||
|
||||
guestfs___cmd_add_arg (cmd3, g->hv);
|
||||
guestfs___cmd_add_arg (cmd3, "-nographic");
|
||||
guestfs___cmd_add_arg (cmd3, "-display");
|
||||
guestfs___cmd_add_arg (cmd3, "none");
|
||||
guestfs___cmd_add_arg (cmd3, "-machine");
|
||||
guestfs___cmd_add_arg (cmd3, "accel=kvm:tcg");
|
||||
guestfs___cmd_add_arg (cmd3, "-device");
|
||||
|
||||
@@ -295,6 +295,7 @@ guestfs__config (guestfs_h *g,
|
||||
if (STREQ (hv_param, "-kernel") ||
|
||||
STREQ (hv_param, "-initrd") ||
|
||||
STREQ (hv_param, "-nographic") ||
|
||||
STREQ (hv_param, "-display") ||
|
||||
STREQ (hv_param, "-serial") ||
|
||||
STREQ (hv_param, "-full-screen") ||
|
||||
STREQ (hv_param, "-std-vga") ||
|
||||
|
||||
Reference in New Issue
Block a user