From a434d825ab57df108ada2531d82e428f0b10e203 Mon Sep 17 00:00:00 2001
From: Laszlo Ersek <lersek@redhat.com>
Date: Thu, 31 Oct 2013 16:29:28 +0100
Subject: [PATCH 09/29] dump: qmp_dump_guest_memory(): use error_setg_file_open()
RH-Author: Laszlo Ersek <lersek@redhat.com>
Message-id: <1383236971-6067-6-git-send-email-lersek@redhat.com>
Patchwork-id: 55195
O-Subject: [RHEL-7 qemu-kvm PATCH 5/8] dump: qmp_dump_guest_memory(): 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 7581766b719afd63dcf922ddbf982291f596ed12)
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
dump.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
dump.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dump.c b/dump.c
index 0523ad4..b203a8d 100644
--- a/dump.c
+++ b/dump.c
@@ -874,7 +874,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;
}
}
--
1.7.1