aboutsummaryrefslogtreecommitdiff
path: root/block/vvfat.c
diff options
context:
space:
mode:
authorCorey Bryant <coreyb@linux.vnet.ibm.com>2012-08-14 16:43:46 -0400
committerKevin Wolf <kwolf@redhat.com>2012-08-15 10:48:57 +0200
commit2e1e79dae7a7e0a3d698fbd359d75e3a0239bdaa (patch)
treea811ed28427ba314c33b17d739d9093e3ecd0b1c /block/vvfat.c
parent6165f4d85d92e15b6aebdeeb2559dc687b0353c7 (diff)
downloadqemu-2e1e79dae7a7e0a3d698fbd359d75e3a0239bdaa.zip
qemu-2e1e79dae7a7e0a3d698fbd359d75e3a0239bdaa.tar.gz
qemu-2e1e79dae7a7e0a3d698fbd359d75e3a0239bdaa.tar.bz2
block: Convert close calls to qemu_close
This patch converts all block layer close calls, that correspond to qemu_open calls, to qemu_close. 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.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/block/vvfat.c b/block/vvfat.c
index 22b586a..59d3c5b 100644
--- a/block/vvfat.c
+++ b/block/vvfat.c
@@ -1105,7 +1105,7 @@ static inline void vvfat_close_current_file(BDRVVVFATState *s)
if(s->current_mapping) {
s->current_mapping = NULL;
if (s->current_fd) {
- close(s->current_fd);
+ qemu_close(s->current_fd);
s->current_fd = 0;
}
}
@@ -2230,7 +2230,7 @@ static int commit_one_file(BDRVVVFATState* s,
}
if (offset > 0) {
if (lseek(fd, offset, SEEK_SET) != offset) {
- close(fd);
+ qemu_close(fd);
g_free(cluster);
return -3;
}
@@ -2251,13 +2251,13 @@ static int commit_one_file(BDRVVVFATState* s,
(uint8_t*)cluster, (rest_size + 0x1ff) / 0x200);
if (ret < 0) {
- close(fd);
+ qemu_close(fd);
g_free(cluster);
return ret;
}
if (write(fd, cluster, rest_size) < 0) {
- close(fd);
+ qemu_close(fd);
g_free(cluster);
return -2;
}
@@ -2268,11 +2268,11 @@ static int commit_one_file(BDRVVVFATState* s,
if (ftruncate(fd, size)) {
perror("ftruncate()");
- close(fd);
+ qemu_close(fd);
g_free(cluster);
return -4;
}
- close(fd);
+ qemu_close(fd);
g_free(cluster);
return commit_mappings(s, first_cluster, dir_index);