qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCHv2 1/6] dump: create writable files


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCHv2 1/6] dump: create writable files
Date: Thu, 04 Apr 2013 11:42:43 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4

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 <address@hidden>
> ---
>  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
address@hidden and address@hidden, please.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]