yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
Blob Blame History Raw
From 36268b43efcc3d639e973a4a47cb32d38e92bc93 Mon Sep 17 00:00:00 2001
From: Laszlo Ersek <lersek@redhat.com>
Date: Thu, 31 Oct 2013 16:29:27 +0100
Subject: [PATCH 08/29] cpus: use error_setg_file_open()

RH-Author: Laszlo Ersek <lersek@redhat.com>
Message-id: <1383236971-6067-5-git-send-email-lersek@redhat.com>
Patchwork-id: 55194
O-Subject: [RHEL-7 qemu-kvm PATCH 4/8] cpus: use error_setg_file_open()
Bugzilla: 907743
RH-Acked-by: Luiz Capitulino <lcapitulino@redhat.com>
RH-Acked-by: Kevin Wolf <kwolf@redhat.com>
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>

From: Luiz Capitulino <lcapitulino@redhat.com>

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Acked-by: Kevin Wolf <kwolf@redhat.com>
(cherry picked from commit 618da851ec8059460be8e0670bc835d3c2003708)
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
 cpus.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
 cpus.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/cpus.c b/cpus.c
index 3b7b380..caccf5a 100644
--- a/cpus.c
+++ b/cpus.c
@@ -1316,7 +1316,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;
     }
 
@@ -1346,7 +1346,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;
     }
 
-- 
1.7.1