diff options
author | Avi Kivity <avi@redhat.com> | 2009-06-16 16:21:08 +0300 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-06-16 15:18:35 -0500 |
commit | 736d0c25ed3e13a3af3d24524c05be1bb1ff5158 (patch) | |
tree | b80469c9588b914be76b4558495147b630272fda /block | |
parent | d3fa1e0f36ee3b4fc61bd5c6b681c82932ebec41 (diff) |
raw-posix: open flags use BDRV_ namespace, not posix namespace
The flags argument to raw_common_open() contain bits defined by the BDRV_O_*
namespace, not the posix O_* namespace.
Adjust to use the correct constants.
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/raw-posix.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/raw-posix.c b/block/raw-posix.c index 50323485f9..5790206741 100644 --- a/block/raw-posix.c +++ b/block/raw-posix.c @@ -133,7 +133,7 @@ static int raw_open_common(BlockDriverState *bs, const char *filename, s->lseek_err_cnt = 0; s->open_flags |= O_BINARY; - if ((flags & BDRV_O_ACCESS) == O_RDWR) { + if ((flags & BDRV_O_ACCESS) == BDRV_O_RDWR) { s->open_flags |= O_RDWR; } else { s->open_flags |= O_RDONLY; |