Commit 736d0c25 authored by Avi Kivity's avatar Avi Kivity Committed by Anthony Liguori
Browse files

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: default avatarAvi Kivity <avi@redhat.com>
Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
parent d3fa1e0f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;