Patchwork [6/9] cpus: use error_setg_file_open()

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

Comments

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

Patch

diff --git a/cpus.c b/cpus.c
index c232265..c8bc8ad 100644
--- a/cpus.c
+++ b/cpus.c
@@ -1278,7 +1278,7 @@  void qmp_memsave(int64_t addr, int64_t size, const char *filename,
 
     f = fopen(filename, "wb");
     if (!f) {
-        error_set(errp, QERR_OPEN_FILE_FAILED, filename);
+        error_setg_file_open(errp, errno, filename);
         return;
     }
 
@@ -1308,7 +1308,7 @@  void qmp_pmemsave(int64_t addr, int64_t size, const char *filename,
 
     f = fopen(filename, "wb");
     if (!f) {
-        error_set(errp, QERR_OPEN_FILE_FAILED, filename);
+        error_setg_file_open(errp, errno, filename);
         return;
     }