]> Git Repo - qemu.git/commit - block/raw-posix.c
raw-posix: Remove O_RDWR when attempting to open a file read-only
authorAvi Kivity <[email protected]>
Tue, 16 Jun 2009 13:21:09 +0000 (16:21 +0300)
committerAnthony Liguori <[email protected]>
Tue, 16 Jun 2009 20:18:35 +0000 (15:18 -0500)
commit11a1feb6552e3a4709e454faea5e3be5ca8d9e6a
tree52b7ccb48188e499129d28958a5108039c42f1d3
parent736d0c25ed3e13a3af3d24524c05be1bb1ff5158
raw-posix: Remove O_RDWR when attempting to open a file read-only

When we open a file, we first attempt to open it read-write, then fall back
to read-only.  Unfortunately we reuse the flags from the previous attempt,
so both attempts try to open the file with write permissions, and fail.

Fix by clearing the O_RDWR flag from the previous attempt.

Signed-off-by: Avi Kivity <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
block/raw-posix.c
This page took 0.023346 seconds and 4 git commands to generate.