monitor: convert do_memory_save() to QError
authorMarkus Armbruster <armbru@redhat.com>
Wed, 20 Jan 2010 12:07:32 +0000 (13:07 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Tue, 26 Jan 2010 20:55:10 +0000 (14:55 -0600)
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
monitor.c

index 0595f0db95201a93de332a86bb0aee84dc3193fc..7b7a46585abbaf7affb9d503ab3f67ccf3ed54d3 100644 (file)
--- a/monitor.c
+++ b/monitor.c
@@ -1316,7 +1316,7 @@ static void do_memory_save(Monitor *mon, const QDict *qdict, QObject **ret_data)
 
     f = fopen(filename, "wb");
     if (!f) {
-        monitor_printf(mon, "could not open '%s'\n", filename);
+        qemu_error_new(QERR_OPEN_FILE_FAILED, filename);
         return;
     }
     while (size != 0) {