qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 02/22] savevm: Don't check the return of qemu_fopen_


From: Luiz Capitulino
Subject: [Qemu-devel] [PATCH 02/22] savevm: Don't check the return of qemu_fopen_bdrv()
Date: Tue, 20 Apr 2010 18:09:32 -0300

It never fails.

Signed-off-by: Luiz Capitulino <address@hidden>
---
 savevm.c |    8 --------
 1 files changed, 0 insertions(+), 8 deletions(-)

diff --git a/savevm.c b/savevm.c
index 086c92a..254f9fc 100644
--- a/savevm.c
+++ b/savevm.c
@@ -1705,10 +1705,6 @@ void do_savevm(Monitor *mon, const QDict *qdict)
 
     /* save the VM state */
     f = qemu_fopen_bdrv(bs, 1);
-    if (!f) {
-        monitor_printf(mon, "Could not open VM state file\n");
-        goto the_end;
-    }
     ret = qemu_savevm_state(mon, f);
     vm_state_size = qemu_ftell(f);
     qemu_fclose(f);
@@ -1790,10 +1786,6 @@ int load_vmstate(const char *name)
 
     /* restore the VM state */
     f = qemu_fopen_bdrv(bs, 0);
-    if (!f) {
-        error_report("Could not open VM state file");
-        return -EINVAL;
-    }
     ret = qemu_loadvm_state(f);
     qemu_fclose(f);
     if (ret < 0) {
-- 
1.7.1.rc1.12.ga6018





reply via email to

[Prev in Thread] Current Thread [Next in Thread]