From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:47404) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNgh3-00016k-TT for qemu-devel@nongnu.org; Thu, 04 Apr 2013 05:42:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UNgh2-0003aU-NS for qemu-devel@nongnu.org; Thu, 04 Apr 2013 05:42:53 -0400 Received: from mail-qa0-f45.google.com ([209.85.216.45]:38965) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNgh2-0003aK-JU for qemu-devel@nongnu.org; Thu, 04 Apr 2013 05:42:52 -0400 Received: by mail-qa0-f45.google.com with SMTP id hg5so2496066qab.18 for ; Thu, 04 Apr 2013 02:42:52 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <515D4B13.3070706@redhat.com> Date: Thu, 04 Apr 2013 11:42:43 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1364146041-27041-1-git-send-email-rabin@rab.in> <1364146041-27041-2-git-send-email-rabin@rab.in> In-Reply-To: <1364146041-27041-2-git-send-email-rabin@rab.in> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCHv2 1/6] dump: create writable files List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Rabin Vincent Cc: qemu-devel@nongnu.org Il 24/03/2013 18:27, Rabin Vincent ha scritto: > 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 > --- > 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; > Rabim, I think you should resend this patch separately. Cc qemu-trivial@nongnu.org and qemu-stable@nongnu.org, please. Paolo