[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 1/4] dump: create writable files
From: |
Rabin Vincent |
Subject: |
[Qemu-devel] [PATCH 1/4] dump: create writable files |
Date: |
Wed, 20 Jun 2012 22:58:20 +0530 |
Make dump-guest-memory not create read-only files, so that it can
overwrite a file created by a previous invocation without having it to
be removed externally.
Signed-off-by: Rabin Vincent <address@hidden>
---
dump.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dump.c b/dump.c
index 2bf8d8d..5c5cb4d 100644
--- a/dump.c
+++ b/dump.c
@@ -845,7 +845,8 @@ void qmp_dump_guest_memory(bool paging, const char *file,
bool has_begin,
#endif
if (strstart(file, "file:", &p)) {
- fd = qemu_open(p, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, S_IRUSR);
+ fd = qemu_open(p, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY,
+ S_IRUSR | S_IWUSR);
if (fd < 0) {
error_set(errp, QERR_OPEN_FILE_FAILED, p);
return;
--
1.7.9.5