aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2006-08-01 16:21:11 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2006-08-01 16:21:11 +0000
commit83f6409109acd7cd13ff8a603f29c46033c4fb00 (patch)
treee06b75a308f58785b6c646d192e8e53fda006e20 /block-vpc.c
parentcommit to specific devices (diff)
downloadqemu-kvm-83f6409109acd7cd13ff8a603f29c46033c4fb00.tar.gz
qemu-kvm-83f6409109acd7cd13ff8a603f29c46033c4fb00.tar.bz2
qemu-kvm-83f6409109acd7cd13ff8a603f29c46033c4fb00.zip
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-vpc.c')
-rw-r--r--block-vpc.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/block-vpc.c b/block-vpc.c
index bdc3b8891..4d228c5b6 100644
--- a/block-vpc.c
+++ b/block-vpc.c
@@ -86,19 +86,16 @@ static int vpc_probe(const uint8_t *buf, int buf_size, const char *filename)
return 0;
}
-static int vpc_open(BlockDriverState *bs, const char *filename)
+static int vpc_open(BlockDriverState *bs, const char *filename, int flags)
{
BDRVVPCState *s = bs->opaque;
int fd, i;
struct vpc_subheader header;
- fd = open(filename, O_RDWR | O_BINARY | O_LARGEFILE);
- if (fd < 0) {
- fd = open(filename, O_RDONLY | O_BINARY | O_LARGEFILE);
- if (fd < 0)
- return -1;
- }
-
+ fd = open(filename, O_RDONLY | O_BINARY);
+ if (fd < 0)
+ return -1;
+
bs->read_only = 1; // no write support yet
s->fd = fd;