qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] qga: fix append file open modes for win32
@ 2015-11-09 21:49 Kirk Allan
  2015-11-10 15:40 ` Michael Roth
  0 siblings, 1 reply; 8+ messages in thread
From: Kirk Allan @ 2015-11-09 21:49 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kirk Allan, mdroth

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

Signed-off-by: Kirk Allan <kallan@suse.com>
---
 qga/commands-win32.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/qga/commands-win32.c b/qga/commands-win32.c
index a5306e7..0a23b9b 100644
--- a/qga/commands-win32.c
+++ b/qga/commands-win32.c
@@ -70,16 +70,16 @@ static OpenFlags guest_file_open_modes[] = {
     {"rb",  GENERIC_READ,               OPEN_EXISTING},
     {"w",   GENERIC_WRITE,              CREATE_ALWAYS},
     {"wb",  GENERIC_WRITE,              CREATE_ALWAYS},
-    {"a",   GENERIC_WRITE,              OPEN_ALWAYS  },
+    {"a",   FILE_APPEND_DATA,           OPEN_ALWAYS  },
     {"r+",  GENERIC_WRITE|GENERIC_READ, OPEN_EXISTING},
     {"rb+", GENERIC_WRITE|GENERIC_READ, OPEN_EXISTING},
     {"r+b", GENERIC_WRITE|GENERIC_READ, OPEN_EXISTING},
     {"w+",  GENERIC_WRITE|GENERIC_READ, CREATE_ALWAYS},
     {"wb+", GENERIC_WRITE|GENERIC_READ, CREATE_ALWAYS},
     {"w+b", GENERIC_WRITE|GENERIC_READ, CREATE_ALWAYS},
-    {"a+",  GENERIC_WRITE|GENERIC_READ, OPEN_ALWAYS  },
-    {"ab+", GENERIC_WRITE|GENERIC_READ, OPEN_ALWAYS  },
-    {"a+b", GENERIC_WRITE|GENERIC_READ, OPEN_ALWAYS  }
+    {"a+",  FILE_APPEND_DATA,           OPEN_ALWAYS  },
+    {"ab+", FILE_APPEND_DATA,           OPEN_ALWAYS  },
+    {"a+b", FILE_APPEND_DATA,           OPEN_ALWAYS  }
 };
 
 static OpenFlags *find_open_flag(const char *mode_str)
-- 
1.8.5.6

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-11-11 15:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-09 21:49 [Qemu-devel] [PATCH] qga: fix append file open modes for win32 Kirk Allan
2015-11-10 15:40 ` Michael Roth
2015-11-10 17:59   ` Paolo Bonzini
2015-11-10 20:45     ` Kirk Allan
2015-11-11 14:02     ` Michael Roth
2015-11-11 14:49       ` Paolo Bonzini
2015-11-11 15:39         ` Michael Roth
2015-11-11 15:42           ` Kirk Allan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).