aboutsummaryrefslogtreecommitdiff
path: root/block/vdi.c
diff options
context:
space:
mode:
authorCorey Bryant <coreyb@linux.vnet.ibm.com>2012-08-14 16:43:45 -0400
committerKevin Wolf <kwolf@redhat.com>2012-08-15 10:48:57 +0200
commit6165f4d85d92e15b6aebdeeb2559dc687b0353c7 (patch)
tree8803e96745c9daaada75bc7296c459750d1fa20f /block/vdi.c
parente17408283562be359f16a7e12ddfee7509d6fe11 (diff)
block: Convert open calls to qemu_open
This patch converts all block layer open calls to qemu_open. Note that this adds the O_CLOEXEC flag to the changed open paths when the O_CLOEXEC macro is defined. Signed-off-by: Corey Bryant <coreyb@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/vdi.c')
-rw-r--r--block/vdi.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/block/vdi.c b/block/vdi.c
index 57325d65c4..c4f1529db9 100644
--- a/block/vdi.c
+++ b/block/vdi.c
@@ -653,8 +653,9 @@ static int vdi_create(const char *filename, QEMUOptionParameter *options)
options++;
}
- fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY | O_LARGEFILE,
- 0644);
+ fd = qemu_open(filename,
+ O_WRONLY | O_CREAT | O_TRUNC | O_BINARY | O_LARGEFILE,
+ 0644);
if (fd < 0) {
return -errno;
}