qemu-ppc
[Top][All Lists]
Advanced

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

Re: [Qemu-ppc] [Qemu-devel] [PATCH -V3 3/4] target-ppc: Check for error


From: Andreas Färber
Subject: Re: [Qemu-ppc] [Qemu-devel] [PATCH -V3 3/4] target-ppc: Check for error on address translation in memsave command
Date: Mon, 26 Aug 2013 00:17:37 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8

Am 25.08.2013 20:32, schrieb Alexander Graf:
> 
> On 23.08.2013, at 06:20, Aneesh Kumar K.V wrote:
> 
>> From: "Aneesh Kumar K.V" <address@hidden>
>>
>> When we translate the virtual address to physical check for error.
>>
>> Signed-off-by: Aneesh Kumar K.V <address@hidden>
> 
> I think this change is sane, but I'd really prefer to see an ack from (or get 
> this applied by) Luiz.
> 
> 
> Alex
> 
>> ---
>> cpus.c | 5 ++++-
>> 1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/cpus.c b/cpus.c
>> index 0f65e76..658366d 100644
>> --- a/cpus.c
>> +++ b/cpus.c
>> @@ -1309,7 +1309,10 @@ void qmp_memsave(int64_t addr, int64_t size, const 
>> char *filename,
>>       l = sizeof(buf);
>>       if (l > size)
>>           l = size;
>> -        cpu_memory_rw_debug(cpu, addr, buf, l, 0);
>> +        if (cpu_memory_rw_debug(cpu, addr, buf, l, 0) != 0) {
>> +            error_set(errp, QERR_INVALID_PARAMETER, "addr");

I've been repeatedly told error_set() should no longer be used, in favor
of error_setg(). :)

Andreas

>> +            goto exit;
>> +        }
>>       if (fwrite(buf, 1, l, f) != l) {
>>           error_set(errp, QERR_IO_ERROR);
>>           goto exit;
>> -- 
>> 1.8.1.2
>>
> 
> 


-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg



reply via email to

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