From f5edb014ed221db6942225ec675aafe2675632dd Mon Sep 17 00:00:00 2001 From: Naphtali Sprei Date: Sun, 17 Jan 2010 16:48:13 +0200 Subject: 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 Signed-off-by: Anthony Liguori --- block/raw-posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'block/raw-posix.c') diff --git a/block/raw-posix.c b/block/raw-posix.c index eea7e56..52bbcda 100644 --- a/block/raw-posix.c +++ b/block/raw-posix.c @@ -138,7 +138,7 @@ static int raw_open_common(BlockDriverState *bs, const char *filename, s->open_flags = open_flags | O_BINARY; s->open_flags &= ~O_ACCMODE; - if ((bdrv_flags & BDRV_O_ACCESS) == BDRV_O_RDWR) { + if (bdrv_flags & BDRV_O_RDWR) { s->open_flags |= O_RDWR; } else { s->open_flags |= O_RDONLY; -- cgit v1.1