aboutsummaryrefslogtreecommitdiff
path: root/monitor.c
diff options
context:
space:
mode:
authorLuiz Capitulino <lcapitulino@redhat.com>2011-11-22 17:26:46 -0200
committerLuiz Capitulino <lcapitulino@redhat.com>2011-12-06 11:40:01 -0200
commit6d3962bf848ba06296554976f9fd86af805584bb (patch)
treeae183f38bbce67bf78493fabd6b4a145543b9615 /monitor.c
parent0cfd6a9ab4356cd2c69bb29b1d70e1fd037bc1f2 (diff)
qapi: Convert pmemsave
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c37
1 files changed, 0 insertions, 37 deletions
diff --git a/monitor.c b/monitor.c
index 727201441d..a1b46b3c62 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1370,43 +1370,6 @@ static void do_print(Monitor *mon, const QDict *qdict)
monitor_printf(mon, "\n");
}
-static int do_physical_memory_save(Monitor *mon, const QDict *qdict,
- QObject **ret_data)
-{
- FILE *f;
- uint32_t l;
- uint8_t buf[1024];
- uint32_t size = qdict_get_int(qdict, "size");
- const char *filename = qdict_get_str(qdict, "filename");
- target_phys_addr_t addr = qdict_get_int(qdict, "val");
- int ret = -1;
-
- f = fopen(filename, "wb");
- if (!f) {
- qerror_report(QERR_OPEN_FILE_FAILED, filename);
- return -1;
- }
- while (size != 0) {
- l = sizeof(buf);
- if (l > size)
- l = size;
- cpu_physical_memory_read(addr, buf, l);
- if (fwrite(buf, 1, l, f) != l) {
- monitor_printf(mon, "fwrite() error in do_physical_memory_save\n");
- goto exit;
- }
- fflush(f);
- addr += l;
- size -= l;
- }
-
- ret = 0;
-
-exit:
- fclose(f);
- return ret;
-}
-
static void do_sum(Monitor *mon, const QDict *qdict)
{
uint32_t addr;