From: Rabin Vincent <rabin@rab.in>
To: qemu-devel@nongnu.org
Cc: Rabin Vincent <rabin@rab.in>
Subject: [Qemu-devel] [PATCHv2 1/6] dump: create writable files
Date: Sun, 24 Mar 2013 18:27:16 +0100 [thread overview]
Message-ID: <1364146041-27041-2-git-send-email-rabin@rab.in> (raw)
In-Reply-To: <1364146041-27041-1-git-send-email-rabin@rab.in>
The files dump-guest-memory are created as read-only even for the owner.
This non-standard behaviour makes it annoying to deal with the dump
files (eg. rm -f is needed to delete them or saving a new dump by
overwriting the previous one is not possible). Change the code to
generate files with write permissions set. If someone requires
read-only files to be created, they can achieve it by setting umask.
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 a25f509..8dd86b4 100644
--- a/dump.c
+++ b/dump.c
@@ -841,7 +841,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.10.4
next prev parent reply other threads:[~2013-03-24 17:27 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-24 17:27 [Qemu-devel] [PATCHv2 0/6] ARM dump-guest-memory support Rabin Vincent
2013-03-24 17:27 ` Rabin Vincent [this message]
2013-04-04 9:42 ` [Qemu-devel] [PATCHv2 1/6] dump: create writable files Paolo Bonzini
2013-03-24 17:27 ` [Qemu-devel] [PATCHv2 2/6] dump: extract out note helper Rabin Vincent
2013-03-24 17:27 ` [Qemu-devel] [PATCHv2 3/6] dump: extract out get note size function Rabin Vincent
2013-03-24 17:27 ` [Qemu-devel] [PATCHv2 4/6] dump: fix up memory mapping dependencies / stub Rabin Vincent
2013-04-04 9:43 ` Paolo Bonzini
2013-03-24 17:27 ` [Qemu-devel] [PATCHv2 5/6] target-arm: add dump-guest-memory support Rabin Vincent
2013-03-24 18:34 ` Peter Maydell
2013-03-24 19:26 ` Rabin Vincent
2013-03-24 20:39 ` Peter Maydell
2013-04-04 9:47 ` Paolo Bonzini
2013-04-04 9:49 ` Peter Maydell
2013-03-24 17:27 ` [Qemu-devel] [PATCHv2 6/6] dump: fix memory region handling Rabin Vincent
2013-03-24 18:36 ` Peter Maydell
2013-03-24 19:35 ` Rabin Vincent
2013-03-24 20:18 ` Peter Maydell
2013-03-25 11:49 ` [Qemu-devel] [PATCHv2 0/6] ARM dump-guest-memory support Andreas Färber
2013-03-29 8:36 ` Rabin Vincent
2013-04-04 8:52 ` Andreas Färber
2013-04-09 12:09 ` [Qemu-devel] [RFC] make write_elf_xx functions part of CPUClass, use CPUState Jens Freimann
2013-04-09 13:15 ` Andreas Färber
2013-04-19 14:45 ` [Qemu-devel] [PATCH 0/2] qom: make cpu_write_elfXX_ functions part of CPUClass Jens Freimann
2013-04-19 14:45 ` [Qemu-devel] [PATCH 1/2] qom: Convert cpu_write_elfXX_note functions to CPUState Jens Freimann
2013-04-19 14:45 ` [Qemu-devel] [PATCH 2/2] i386: use CPUClass->write_elf* functions Jens Freimann
2013-04-29 14:21 ` [Qemu-devel] [PATCH 0/2] qom: make cpu_write_elfXX_ functions part of CPUClass Andreas Färber
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=1364146041-27041-2-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).