dump: fix misleading VMCOREINFO phys_base parse error
When qemu_strtou64() fails on the value after NUMBER(phys_base)= or NUMBER(PHYS_OFFSET)=, report a parse failure and include the malformed value. The previous message suggested the field name itself could not be read. Fixes: d9feb51772 ("dump: update phys_base header field based on VMCOREINFO content") Signed-off-by: yujun <yujun@kylinos.cn> Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20260629114646.288664-1-yujun@kylinos.cn>
yujun committed
Jun 29, 2026 at 19:46 UTC
89f7c15e628147edd1cae5214827c8175e8fabd1
1 file changed
+2
-1
dump/dump.c
+2
-1
@@ -1772,7 +1772,8 @@ static void vmcoreinfo_update_phys_base(DumpState *s)
1772
if (prefix && g_str_has_prefix(lines[i], prefix)) {
1773
if (qemu_strtou64(lines[i] + strlen(prefix), NULL, 16,
1774
&phys_base) < 0) {
1775
- warn_report("Failed to read %s", prefix);
1775
+ warn_report("failed to parse %s in VMCOREINFO: '%s'",
1776
+ prefix, lines[i] + strlen(prefix));
1777
} else {
1778
s->dump_info.phys_base = phys_base;
1779
}