summaryrefslogtreecommitdiff
path: root/block/raw-win32.c
diff options
context:
space:
mode:
authorNaphtali Sprei <nsprei@redhat.com>2010-01-17 16:48:13 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2010-01-20 08:25:22 -0600
commit248a0f5425167cfe5d7c9f6a4b689b599ca2d1c1 (patch)
tree8c4d10e0d64b55c4320e1837749fc03cbf80941e /block/raw-win32.c
parent3b6b481dab94cc7419920cbbb231db78558a4941 (diff)
downloadqemu-248a0f5425167cfe5d7c9f6a4b689b599ca2d1c1.tar.gz
qemu-248a0f5425167cfe5d7c9f6a4b689b599ca2d1c1.tar.bz2
qemu-248a0f5425167cfe5d7c9f6a4b689b599ca2d1c1.zip
Clean-up a little bit the RW related bits of BDRV_O_FLAGS. BDRV_O_RDONLY gone (and so is BDRV_O_ACCESS). Default value for bdrv_flags (0/zero) is READ-ONLY. Need to explicitly request READ-WRITE.
Instead of using the field 'readonly' of the BlockDriverState struct for passing the request, pass the request in the flags parameter to the function. Signed-off-by: Naphtali Sprei <nsprei@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'block/raw-win32.c')
-rw-r--r--block/raw-win32.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/block/raw-win32.c b/block/raw-win32.c
index 72acad58f9..01a6d2519e 100644
--- a/block/raw-win32.c
+++ b/block/raw-win32.c
@@ -81,7 +81,7 @@ static int raw_open(BlockDriverState *bs, const char *filename, int flags)
s->type = FTYPE_FILE;
- if ((flags & BDRV_O_ACCESS) == O_RDWR) {
+ if (flags & BDRV_O_RDWR) {
access_flags = GENERIC_READ | GENERIC_WRITE;
} else {
access_flags = GENERIC_READ;
@@ -337,7 +337,7 @@ static int hdev_open(BlockDriverState *bs, const char *filename, int flags)
}
s->type = find_device_type(bs, filename);
- if ((flags & BDRV_O_ACCESS) == O_RDWR) {
+ if (flags & BDRV_O_RDWR) {
access_flags = GENERIC_READ | GENERIC_WRITE;
} else {
access_flags = GENERIC_READ;