yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
218e99
From bfff0a4af270437508a38f1795e87ff293c4f9d4 Mon Sep 17 00:00:00 2001
218e99
From: Laszlo Ersek <lersek@redhat.com>
218e99
Date: Thu, 31 Oct 2013 16:29:24 +0100
218e99
Subject: [PATCH 05/29] rng-random: use error_setg_file_open()
218e99
218e99
RH-Author: Laszlo Ersek <lersek@redhat.com>
218e99
Message-id: <1383236971-6067-2-git-send-email-lersek@redhat.com>
218e99
Patchwork-id: 55191
218e99
O-Subject: [RHEL-7 qemu-kvm PATCH 1/8] rng-random: use error_setg_file_open()
218e99
Bugzilla: 907743
218e99
RH-Acked-by: Luiz Capitulino <lcapitulino@redhat.com>
218e99
RH-Acked-by: Kevin Wolf <kwolf@redhat.com>
218e99
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
218e99
218e99
From: Luiz Capitulino <lcapitulino@redhat.com>
218e99
218e99
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
218e99
Acked-by: Kevin Wolf <kwolf@redhat.com>
218e99
(cherry picked from commit bc5741add11113ee8febdcf33931ec3afe10c729)
218e99
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
218e99
---
218e99
 backends/rng-random.c | 3 +--
218e99
 1 file changed, 1 insertion(+), 2 deletions(-)
218e99
218e99
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
218e99
---
218e99
 backends/rng-random.c |    3 +--
218e99
 1 files changed, 1 insertions(+), 2 deletions(-)
218e99
218e99
diff --git a/backends/rng-random.c b/backends/rng-random.c
218e99
index 830360c..68dfc8a 100644
218e99
--- a/backends/rng-random.c
218e99
+++ b/backends/rng-random.c
218e99
@@ -78,9 +78,8 @@ static void rng_random_opened(RngBackend *b, Error **errp)
218e99
                   "filename", "a valid filename");
218e99
     } else {
218e99
         s->fd = qemu_open(s->filename, O_RDONLY | O_NONBLOCK);
218e99
-
218e99
         if (s->fd == -1) {
218e99
-            error_set(errp, QERR_OPEN_FILE_FAILED, s->filename);
218e99
+            error_setg_file_open(errp, errno, s->filename);
218e99
         }
218e99
     }
218e99
 }
218e99
-- 
218e99
1.7.1
218e99