[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] hw/i386: return an error message when mb magic/pvh note could n
From: |
nathan |
Subject: |
[PATCH] hw/i386: return an error message when mb magic/pvh note could not be found |
Date: |
Thu, 08 Feb 2024 11:11:39 +0000 |
When using a non-linux kernel where the multiboot magic is
misconfigured the following message would display: "linux kernel too old to
load a ram
disk".
This patch instead, displays a more descriptive error message: "could not find
multiboot magic or PVH ELF Note". The linux specific boot sequence is skipped
because earlier it is asserted that the linux protocol magic field could not be
found.
Signed-off-by: Nathan Kolpa <nathan@kolpa.me>
---
hw/i386/x86.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/hw/i386/x86.c b/hw/i386/x86.c
index 2b6291ad8d..b59f1180f5 100644
--- a/hw/i386/x86.c
+++ b/hw/i386/x86.c
@@ -902,7 +902,10 @@ void x86_load_linux(X86MachineState *x86ms,
return;
}
- protocol = 0;
+
+ fprintf(stderr, "qemu: could not find multiboot magic or "
+ "PVH ELF Note.\n");
+ exit(1);
}
if (protocol < 0x200 || !(header[0x211] & 0x01)) {
--
2.43.0
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] hw/i386: return an error message when mb magic/pvh note could not be found,
nathan <=