summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/qemu/qemu/0011-hw-i386-pc-fix-regression-in-parsing-vga-cmdline-par.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/qemu/qemu/0011-hw-i386-pc-fix-regression-in-parsing-vga-cmdline-par.patch')
-rw-r--r--meta/recipes-devtools/qemu/qemu/0011-hw-i386-pc-fix-regression-in-parsing-vga-cmdline-par.patch54
1 files changed, 0 insertions, 54 deletions
diff --git a/meta/recipes-devtools/qemu/qemu/0011-hw-i386-pc-fix-regression-in-parsing-vga-cmdline-par.patch b/meta/recipes-devtools/qemu/qemu/0011-hw-i386-pc-fix-regression-in-parsing-vga-cmdline-par.patch
deleted file mode 100644
index 2fe0850a33..0000000000
--- a/meta/recipes-devtools/qemu/qemu/0011-hw-i386-pc-fix-regression-in-parsing-vga-cmdline-par.patch
+++ /dev/null
@@ -1,54 +0,0 @@
1From a88c40f02ace88f09b2a85a64831b277b2ebc88c Mon Sep 17 00:00:00 2001
2From: Peter Wu <peter@lekensteyn.nl>
3Date: Sat, 21 Dec 2019 17:21:24 +0100
4Subject: [PATCH] hw/i386/pc: fix regression in parsing vga cmdline parameter
5
6When the 'vga=' parameter is succeeded by another parameter, QEMU 4.2.0
7would refuse to start with a rather cryptic message:
8
9 $ qemu-system-x86_64 -kernel /boot/vmlinuz-linux -append 'vga=792 quiet'
10 qemu: can't parse 'vga' parameter: Invalid argument
11
12It was not clear whether this applied to the '-vga std' parameter or the
13'-append' one. Fix the parsing regression and clarify the error.
14
15Fixes: 133ef074bd ("hw/i386/pc: replace use of strtol with qemu_strtoui in x86_load_linux()")
16Cc: Sergio Lopez <slp@redhat.com>
17Signed-off-by: Peter Wu <peter@lekensteyn.nl>
18Message-Id: <20191221162124.1159291-1-peter@lekensteyn.nl>
19Cc: qemu-stable@nongnu.org
20Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
21Upstream-Status: Backport [https://git.qemu.org/?p=qemu.git;a=commitdiff;h=a88c40f02ace88f09b2a85a64831b277b2ebc88c]
22---
23 hw/i386/x86.c | 8 ++++----
24 1 file changed, 4 insertions(+), 4 deletions(-)
25
26diff --git a/hw/i386/x86.c b/hw/i386/x86.c
27index d8bb5c2a96..9b9a4d5837 100644
28--- a/hw/i386/x86.c
29+++ b/hw/i386/x86.c
30@@ -612,6 +612,7 @@ void x86_load_linux(X86MachineState *x86ms,
31 vmode = strstr(kernel_cmdline, "vga=");
32 if (vmode) {
33 unsigned int video_mode;
34+ const char *end;
35 int ret;
36 /* skip "vga=" */
37 vmode += 4;
38@@ -622,10 +623,9 @@ void x86_load_linux(X86MachineState *x86ms,
39 } else if (!strncmp(vmode, "ask", 3)) {
40 video_mode = 0xfffd;
41 } else {
42- ret = qemu_strtoui(vmode, NULL, 0, &video_mode);
43- if (ret != 0) {
44- fprintf(stderr, "qemu: can't parse 'vga' parameter: %s\n",
45- strerror(-ret));
46+ ret = qemu_strtoui(vmode, &end, 0, &video_mode);
47+ if (ret != 0 || (*end && *end != ' ')) {
48+ fprintf(stderr, "qemu: invalid 'vga=' kernel parameter.\n");
49 exit(1);
50 }
51 }
52--
532.25.0
54