Received: from eggs.gnu.org ([208.118.235.92]:45211) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ShOhx-0001c3-6w for qemu-devel@nongnu.org; Wed, 20 Jun 2012 13:28:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ShOhv-0000Pz-I0 for qemu-devel@nongnu.org; Wed, 20 Jun 2012 13:28:44 -0400 Received: from mail-pz0-f45.google.com ([209.85.210.45]:42334) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ShOhv-0000P0-8n for qemu-devel@nongnu.org; Wed, 20 Jun 2012 13:28:43 -0400 Received: by dadn2 with SMTP id n2so9675101dad.4 for ; Wed, 20 Jun 2012 10:28:40 -0700 (PDT) Sender: Rabin Vincent From: Rabin Vincent Date: Wed, 20 Jun 2012 22:58:20 +0530 Message-Id: <1340213303-596-1-git-send-email-rabin@rab.in> Subject: [Qemu-devel] [PATCH 1/4] dump: create writable files List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Rabin Vincent 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 --- 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