diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2006-08-01 16:21:11 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2006-08-01 16:21:11 +0000 |
commit | 83f6409109acd7cd13ff8a603f29c46033c4fb00 (patch) | |
tree | e06b75a308f58785b6c646d192e8e53fda006e20 /block-dmg.c | |
parent | 7954c73498b7e782ba5db2993637daef456b6310 (diff) |
async file I/O API
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2075 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'block-dmg.c')
-rw-r--r-- | block-dmg.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/block-dmg.c b/block-dmg.c index a16ab926b5..a883a23f8e 100644 --- a/block-dmg.c +++ b/block-dmg.c @@ -73,16 +73,16 @@ static off_t read_uint32(int fd) return be32_to_cpu(buffer); } -static int dmg_open(BlockDriverState *bs, const char *filename) +static int dmg_open(BlockDriverState *bs, const char *filename, int flags) { BDRVDMGState *s = bs->opaque; off_t info_begin,info_end,last_in_offset,last_out_offset; uint32_t count; uint32_t max_compressed_size=1,max_sectors_per_chunk=1,i; - s->fd = open(filename, O_RDONLY | O_BINARY | O_LARGEFILE); + s->fd = open(filename, O_RDONLY | O_BINARY); if (s->fd < 0) - return -1; + return -errno; bs->read_only = 1; s->n_chunks = 0; s->offsets = s->lengths = s->sectors = s->sectorcounts = 0; @@ -93,7 +93,7 @@ dmg_close: close(s->fd); /* open raw instead */ bs->drv=&bdrv_raw; - return bs->drv->bdrv_open(bs,filename); + return bs->drv->bdrv_open(bs, filename, flags); } info_begin=read_off(s->fd); if(info_begin==0) |