diff options
author | Corey Bryant <coreyb@linux.vnet.ibm.com> | 2012-08-14 16:43:45 -0400 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2012-08-15 10:48:57 +0200 |
commit | 6165f4d85d92e15b6aebdeeb2559dc687b0353c7 (patch) | |
tree | 8803e96745c9daaada75bc7296c459750d1fa20f /block/vvfat.c | |
parent | e17408283562be359f16a7e12ddfee7509d6fe11 (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/vvfat.c')
-rw-r--r-- | block/vvfat.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/block/vvfat.c b/block/vvfat.c index 7b1dcee144..22b586a21b 100644 --- a/block/vvfat.c +++ b/block/vvfat.c @@ -1162,7 +1162,7 @@ static int open_file(BDRVVVFATState* s,mapping_t* mapping) if(!s->current_mapping || strcmp(s->current_mapping->path,mapping->path)) { /* open file */ - int fd = open(mapping->path, O_RDONLY | O_BINARY | O_LARGEFILE); + int fd = qemu_open(mapping->path, O_RDONLY | O_BINARY | O_LARGEFILE); if(fd<0) return -1; vvfat_close_current_file(s); @@ -2221,7 +2221,7 @@ static int commit_one_file(BDRVVVFATState* s, for (i = s->cluster_size; i < offset; i += s->cluster_size) c = modified_fat_get(s, c); - fd = open(mapping->path, O_RDWR | O_CREAT | O_BINARY, 0666); + fd = qemu_open(mapping->path, O_RDWR | O_CREAT | O_BINARY, 0666); if (fd < 0) { fprintf(stderr, "Could not open %s... (%s, %d)\n", mapping->path, strerror(errno), errno); |