Patchwork [7/9] dump: qmp_dump_guest_memory(): use error_setg_file_open()

login
register
mail settings
Submitter Luiz Capitulino
Date June 7, 2013, 7:52 p.m.
Message ID <1370634755-18132-8-git-send-email-lcapitulino@redhat.com>
Download mbox | patch
Permalink /patch/249809/
State New
Headers show

Comments

Luiz Capitulino - June 7, 2013, 7:52 p.m.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
 dump.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/dump.c b/dump.c
index c0d3da5..28fd296 100644
--- a/dump.c
+++ b/dump.c
@@ -847,7 +847,7 @@  void qmp_dump_guest_memory(bool paging, const char *file, bool has_begin,
     if  (strstart(file, "file:", &p)) {
         fd = qemu_open(p, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, S_IRUSR);
         if (fd < 0) {
-            error_set(errp, QERR_OPEN_FILE_FAILED, p);
+            error_setg_file_open(errp, errno, p);
             return;
         }
     }