qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Rabin Vincent <rabin@rab.in>
To: qemu-devel@nongnu.org
Cc: Rabin Vincent <rabin@rab.in>
Subject: [Qemu-devel] [PATCH 1/4] dump: create writable files
Date: Wed, 20 Jun 2012 22:58:20 +0530	[thread overview]
Message-ID: <1340213303-596-1-git-send-email-rabin@rab.in> (raw)

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 <rabin@rab.in>
---
 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

             reply	other threads:[~2012-06-20 17:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-20 17:28 Rabin Vincent [this message]
2012-06-20 17:28 ` [Qemu-devel] [PATCH 2/4] dump: extract out note helper Rabin Vincent
2012-07-04  2:21   ` Wen Congyang
2012-07-04  2:31   ` Wen Congyang
2012-06-20 17:28 ` [Qemu-devel] [PATCH 3/4] dump: extract out get note size function Rabin Vincent
2012-07-04  2:25   ` Wen Congyang
2012-06-20 17:28 ` [Qemu-devel] [PATCH 4/4] target-arm: add minimal dump-guest-memory support Rabin Vincent
     [not found]   ` <CAFEAcA_x1HKmzgdjbi1Xv90Kwn3fwL3U3+_hiaO0wkTiNFR4pA@mail.gmail.com>
2012-07-01  6:22     ` Rabin Vincent
2012-07-04  2:48       ` Wen Congyang
     [not found]     ` <4FEDA2C0.7040405@suse.de>
2012-07-04  2:57       ` Wen Congyang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1340213303-596-1-git-send-email-rabin@rab.in \
    --to=rabin@rab.in \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).