diff options
author | Luiz Capitulino <lcapitulino@redhat.com> | 2013-06-07 14:28:02 -0400 |
---|---|---|
committer | Luiz Capitulino <lcapitulino@redhat.com> | 2013-06-17 11:01:14 -0400 |
commit | bc5741add11113ee8febdcf33931ec3afe10c729 (patch) | |
tree | 3798d5d91069e9aee024eeffd04d2d3f8daf8a8f /backends/rng-random.c | |
parent | 54028d7542cffe97c4685994baac66988c4b7db9 (diff) | |
download | qemu-bc5741add11113ee8febdcf33931ec3afe10c729.tar.gz qemu-bc5741add11113ee8febdcf33931ec3afe10c729.tar.bz2 qemu-bc5741add11113ee8febdcf33931ec3afe10c729.zip |
rng-random: use error_setg_file_open()
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Acked-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'backends/rng-random.c')
-rw-r--r-- | backends/rng-random.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/backends/rng-random.c b/backends/rng-random.c index 830360c780..68dfc8a9c6 100644 --- a/backends/rng-random.c +++ b/backends/rng-random.c @@ -78,9 +78,8 @@ static void rng_random_opened(RngBackend *b, Error **errp) "filename", "a valid filename"); } else { s->fd = qemu_open(s->filename, O_RDONLY | O_NONBLOCK); - if (s->fd == -1) { - error_set(errp, QERR_OPEN_FILE_FAILED, s->filename); + error_setg_file_open(errp, errno, s->filename); } } } |