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>
This commit is contained in:
yujun
2026-06-29 19:46:46 +08:00
committed by Marc-André Lureau
parent 49854252fc
commit 89f7c15e62

View File

@@ -1772,7 +1772,8 @@ static void vmcoreinfo_update_phys_base(DumpState *s)
if (prefix && g_str_has_prefix(lines[i], prefix)) {
if (qemu_strtou64(lines[i] + strlen(prefix), NULL, 16,
&phys_base) < 0) {
warn_report("Failed to read %s", prefix);
warn_report("failed to parse %s in VMCOREINFO: '%s'",
prefix, lines[i] + strlen(prefix));
} else {
s->dump_info.phys_base = phys_base;
}