* Re: [Qemu-devel] [PATCH] Use qemu_open / qemu_close in rng backend
[not found] <5130A4E3.70003@linux.vnet.ibm.com>
@ 2013-03-01 13:36 ` Eric Blake
0 siblings, 0 replies; only message in thread
From: Eric Blake @ 2013-03-01 13:36 UTC (permalink / raw)
To: Stefan Berger; +Cc: qemu-trivial, Paolo Bonzini, qemu-devel@nongnu.org
[-- Attachment #1: Type: text/plain, Size: 1304 bytes --]
[don't you also need to cc the main qemu list, even for trivial patches?]
On 03/01/2013 05:53 AM, Stefan Berger wrote:
> In the rng backend use qemu_open and qemu_close rather than POSIX
> open/close.
>
> Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
>
> diff --git a/backends/rng-random.c b/backends/rng-random.c
> index 0d11088..acd20af 100644
> --- a/backends/rng-random.c
> +++ b/backends/rng-random.c
> @@ -74,7 +74,7 @@ static void rng_random_opened(RngBackend *b, Error
> **errp)
> error_set(errp, QERR_INVALID_PARAMETER_VALUE,
> "filename", "a valid filename");
> } else {
> - s->fd = open(s->filename, O_RDONLY | O_NONBLOCK);
> + s->fd = qemu_open(s->filename, O_RDONLY | O_NONBLOCK);
>
> if (s->fd == -1) {
> error_set(errp, QERR_OPEN_FILE_FAILED, s->filename);
> @@ -130,7 +130,7 @@ static void rng_random_finalize(Object *obj)
> qemu_set_fd_handler(s->fd, NULL, NULL, NULL);
>
> if (s->fd != -1) {
> - close(s->fd);
> + qemu_close(s->fd);
> }
>
> g_free(s->filename);
>
>
>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 621 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-03-01 13:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <5130A4E3.70003@linux.vnet.ibm.com>
2013-03-01 13:36 ` [Qemu-devel] [PATCH] Use qemu_open / qemu_close in rng backend Eric Blake
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).