Skip to content
Commit 52074d0f authored by Kirk Allan's avatar Kirk Allan Committed by Michael Roth
Browse files

qga: fix append file open modes for win32



For append file open modes, use FILE_APPEND_DATA for the desired access
for writing at the end of the file.

Version 2:
For "a+", "ab+", and "a+b" modes use FILE_APPEND_DATA|GENERIC_READ.
ORing in GENERIC_READ starts a read at the begining of the file.  All
writes will append to the end fo the file.

Added white space to maintain the alignment of the guest_file_open_modes[].

Signed-off-by: default avatarKirk Allan <kallan@suse.com>
Cc: qemu-stable@nongnu.org
* use FILE_GENERIC_APPEND macro, which provides same semantics as
  FILE_APPEND_DATA, but retains other flags from GENERIC_WRITE
Signed-off-by: default avatarMichael Roth <mdroth@linux.vnet.ibm.com>
parent 3c07587d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment