rng-random: use error_setg_file_open()
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Acked-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
54028d7542
commit
bc5741add1
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user