« Previous | Next » 

Revision 11a1feb6

ID11a1feb6552e3a4709e454faea5e3be5ca8d9e6a

Added by Avi Kivity almost 15 years ago

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 <>
Signed-off-by: Anthony Liguori <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences