aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2013-03-10 19:33:03 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2013-03-10 19:33:03 -0500
commit6a245c666d02210b8461952eccc17379fdeedd9f (patch)
tree82e0ea4a8f65ae90c6cdbc6c0efecf4c3416a677 /backends
parent6d06368d6bebad74fd16ef76a6bbea0c1cb63c9a (diff)
parentdb2d5eba652ecb7420ac4ef79fc747ef391ad0d9 (diff)
Merge remote-tracking branch 'stefanha/trivial-patches' into staging
# By Lei Li (2) and others # Via Stefan Hajnoczi * stefanha/trivial-patches: Fix the wrong description in qemu manual pci_host: Drop write-only address_space field rng-random: Use qemu_open / qemu_close configure: Require at least spice-protocol-0.12.3 osdep: replace setsockopt by qemu_setsockopt lm32: remove unused function rtc-test: Fix test failures with recent glib configure: Create link to icon bitmap for out-of-tree builds
Diffstat (limited to 'backends')
-rw-r--r--backends/rng-random.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/backends/rng-random.c b/backends/rng-random.c
index 0d1108811d..acd20afad2 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);