qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 1/4] dump: create writable files


From: Wen Congyang
Subject: Re: [Qemu-devel] [PATCH 1/4] dump: create writable files
Date: Wed, 27 Jun 2012 17:24:01 +0800
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100413 Fedora/3.0.4-2.fc13 Thunderbird/3.0.4

At 06/27/2012 04:27 AM, Luiz Capitulino Wrote:
> On Wed, 20 Jun 2012 22:58:20 +0530
> Rabin Vincent <address@hidden> wrote:
> 
>> 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.
> 
> I think we need a force parameter to do this, the command shouldn't overwrite
> files by default.
> 
> Wen, can you review this series please?

OK, I will review it after some days.

Thanks
Wen Congyang

> 
>>
>> 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 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;
> 
> 




reply via email to

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