Commit e2731add29e3c74a472dcb81f90bf9aa14f4b8e1

Authored by bellard
1 parent c9a62117

fixed block close() method prototype


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1068 c046a42c-6fe2-441c-8c8c-71466251a162
block-cow.c
@@ -202,7 +202,7 @@ static int cow_write(BlockDriverState *bs, int64_t sector_num, @@ -202,7 +202,7 @@ static int cow_write(BlockDriverState *bs, int64_t sector_num,
202 return 0; 202 return 0;
203 } 203 }
204 204
205 -static int cow_close(BlockDriverState *bs) 205 +static void cow_close(BlockDriverState *bs)
206 { 206 {
207 BDRVCowState *s = bs->opaque; 207 BDRVCowState *s = bs->opaque;
208 munmap(s->cow_bitmap_addr, s->cow_bitmap_size); 208 munmap(s->cow_bitmap_addr, s->cow_bitmap_size);
block-qcow.c
@@ -521,7 +521,7 @@ static int qcow_write(BlockDriverState *bs, int64_t sector_num, @@ -521,7 +521,7 @@ static int qcow_write(BlockDriverState *bs, int64_t sector_num,
521 return 0; 521 return 0;
522 } 522 }
523 523
524 -static int qcow_close(BlockDriverState *bs) 524 +static void qcow_close(BlockDriverState *bs)
525 { 525 {
526 BDRVQcowState *s = bs->opaque; 526 BDRVQcowState *s = bs->opaque;
527 qemu_free(s->l1_table); 527 qemu_free(s->l1_table);
block-vmdk.c
@@ -258,7 +258,7 @@ static int vmdk_write(BlockDriverState *bs, int64_t sector_num, @@ -258,7 +258,7 @@ static int vmdk_write(BlockDriverState *bs, int64_t sector_num,
258 return -1; 258 return -1;
259 } 259 }
260 260
261 -static int vmdk_close(BlockDriverState *bs) 261 +static void vmdk_close(BlockDriverState *bs)
262 { 262 {
263 BDRVVmdkState *s = bs->opaque; 263 BDRVVmdkState *s = bs->opaque;
264 qemu_free(s->l1_table); 264 qemu_free(s->l1_table);
@@ -554,7 +554,7 @@ static int raw_write(BlockDriverState *bs, int64_t sector_num, @@ -554,7 +554,7 @@ static int raw_write(BlockDriverState *bs, int64_t sector_num,
554 return 0; 554 return 0;
555 } 555 }
556 556
557 -static int raw_close(BlockDriverState *bs) 557 +static void raw_close(BlockDriverState *bs)
558 { 558 {
559 BDRVRawState *s = bs->opaque; 559 BDRVRawState *s = bs->opaque;
560 close(s->fd); 560 close(s->fd);
block_int.h
@@ -33,7 +33,7 @@ struct BlockDriver { @@ -33,7 +33,7 @@ struct BlockDriver {
33 uint8_t *buf, int nb_sectors); 33 uint8_t *buf, int nb_sectors);
34 int (*bdrv_write)(BlockDriverState *bs, int64_t sector_num, 34 int (*bdrv_write)(BlockDriverState *bs, int64_t sector_num,
35 const uint8_t *buf, int nb_sectors); 35 const uint8_t *buf, int nb_sectors);
36 - int (*bdrv_close)(BlockDriverState *bs); 36 + void (*bdrv_close)(BlockDriverState *bs);
37 int (*bdrv_create)(const char *filename, int64_t total_sectors, 37 int (*bdrv_create)(const char *filename, int64_t total_sectors,
38 const char *backing_file, int flags); 38 const char *backing_file, int flags);
39 int (*bdrv_is_allocated)(BlockDriverState *bs, int64_t sector_num, 39 int (*bdrv_is_allocated)(BlockDriverState *bs, int64_t sector_num,