[tip:tools/kvm] kvm tools: Fix SDL and VNC by adding default vidmode

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

 



Commit-ID:  e7a74eb6a0fefa3c75266128cd95fd485adf5e10
Gitweb:     http://git.kernel.org/tip/e7a74eb6a0fefa3c75266128cd95fd485adf5e10
Author:     Asias He <asias.hejun@xxxxxxxxx>
AuthorDate: Sun, 21 Oct 2012 16:46:58 +0800
Committer:  Pekka Enberg <penberg@xxxxxxxxxx>
CommitDate: Sun, 21 Oct 2012 18:19:55 +0300

kvm tools: Fix SDL and VNC by adding default vidmode

In commit d73b168b3145f7bfe3f0e5d968653a1125b93a4e (kvm tools: ui
improvements), the code to set a default vidmode was killed
accidentally. This makes SDL and VNC not working unless '--vidmode'
option is added, e.g lkvm run --sdl --vidmode 786.

Signed-off-by: Asias He <asias.hejun@xxxxxxxxx>
Signed-off-by: Pekka Enberg <penberg@xxxxxxxxxx>
---
 tools/kvm/builtin-run.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/tools/kvm/builtin-run.c b/tools/kvm/builtin-run.c
index 50495a3..709ed33 100644
--- a/tools/kvm/builtin-run.c
+++ b/tools/kvm/builtin-run.c
@@ -593,9 +593,17 @@ static struct kvm *kvm_cmd_run_init(int argc, const char **argv)
 	if (!kvm->cfg.script)
 		kvm->cfg.script = DEFAULT_SCRIPT;
 
-	if (!kvm->cfg.vnc && !kvm->cfg.sdl)
+	if (!kvm->cfg.vidmode)
 		kvm->cfg.vidmode = -1;
 
+	/* vidmode should be either specified or set by default */
+	if (kvm->cfg.vnc || kvm->cfg.sdl) {
+		if (kvm->cfg.vidmode == -1)
+			kvm->cfg.vidmode = 0x312;
+	} else {
+		kvm->cfg.vidmode = 0;
+	}
+
 	if (!kvm->cfg.network)
                 kvm->cfg.network = DEFAULT_NETWORK;
 
--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux