From: yujun <[email protected]>

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 <[email protected]>
Acked-by: Marc-André Lureau <[email protected]>
Message-Id: <[email protected]>
---
 dump/dump.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dump/dump.c b/dump/dump.c
index 7fa2d6f788c..52be7258a5d 100644
--- a/dump/dump.c
+++ b/dump/dump.c
@@ -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;
             }

-- 
2.54.0


Reply via email to