projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
29ad187
)
cpus: Improve error messages on memsave, pmemsave write error
author
Markus Armbruster
<armbru@redhat.com>
Mon, 13 May 2024 14:17:01 +0000
(16:17 +0200)
committer
Markus Armbruster
<armbru@redhat.com>
Mon, 27 May 2024 10:42:44 +0000
(12:42 +0200)
qmp_memsave() and qmp_pmemsave() report fwrite() error as
An IO error has occurred
Improve this to
writing memory to '<filename>' failed
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <
20240513141703
.549874-5-armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
system/cpus.c
patch
|
blob
|
history
diff --git
a/system/cpus.c
b/system/cpus.c
index 68d161d96b746e1e24e357e4a89b485bfdb09f84..f8fa78f33d4b21e1d5ae28f3db913c7e37763166 100644
(file)
--- a/
system/cpus.c
+++ b/
system/cpus.c
@@
-813,7
+813,8
@@
void qmp_memsave(int64_t addr, int64_t size, const char *filename,
goto exit;
}
if (fwrite(buf, 1, l, f) != l) {
- error_setg(errp, QERR_IO_ERROR);
+ error_setg(errp, "writing memory to '%s' failed",
+ filename);
goto exit;
}
addr += l;
@@
-843,7
+844,8
@@
void qmp_pmemsave(int64_t addr, int64_t size, const char *filename,
l = size;
cpu_physical_memory_read(addr, buf, l);
if (fwrite(buf, 1, l, f) != l) {
- error_setg(errp, QERR_IO_ERROR);
+ error_setg(errp, "writing memory to '%s' failed",
+ filename);
goto exit;
}
addr += l;