diff options
Diffstat (limited to 'backends')
-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 830360c..68dfc8a 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); } } } |