[PATCH] kvm tools: Fix SDL and VNC by setting vidmode correctly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In commit dfefbe9d4894efc44c39b2041bd667d0dea43eca
kvm tools: allow arch's to provide their own command-line options,
vidmode is not setup correctly.

Signed-off-by: Asias He <asias.hejun@xxxxxxxxx>
---
 tools/kvm/x86/kvm.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/kvm/x86/kvm.c b/tools/kvm/x86/kvm.c
index 687e6b7..2ba1db0 100644
--- a/tools/kvm/x86/kvm.c
+++ b/tools/kvm/x86/kvm.c
@@ -294,13 +294,13 @@ bool load_bzimage(struct kvm *kvm, int fd_kernel, int fd_initrd,
 		memcpy(p, kernel_cmdline, cmdline_size - 1);
 	}
 
-	if (!kvm->cfg.arch.vidmode)
-		vidmode = -1;
 
 	/* vidmode should be either specified or set by default */
 	if (kvm->cfg.vnc || kvm->cfg.sdl) {
-		if (vidmode == -1)
+		if (!kvm->cfg.arch.vidmode)
 			vidmode = 0x312;
+		else
+			vidmode = kvm->cfg.arch.vidmode;
 	} else {
 		vidmode = 0;
 	}
-- 
1.8.1

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux