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