[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 25/41] buffered_file: make buffered_flush return
From: |
Juan Quintela |
Subject: |
Re: [Qemu-devel] [PATCH 25/41] buffered_file: make buffered_flush return the error code |
Date: |
Tue, 02 Oct 2012 13:06:18 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) |
Paolo Bonzini <address@hidden> wrote:
> Il 21/09/2012 10:47, Juan Quintela ha scritto:
>> Or the amount of data written if there is no error. Adjust all callers.
>>
>> Signed-off-by: Juan Quintela <address@hidden>
>> ---
>> buffered_file.c | 32 ++++++++++++++++++++++++--------
>> 1 file changed, 24 insertions(+), 8 deletions(-)
>>
>> diff --git a/buffered_file.c b/buffered_file.c
>> index 747d672..9db73dc 100644
>> --- a/buffered_file.c
>> +++ b/buffered_file.c
>> @@ -58,26 +58,26 @@ static void buffered_append(QEMUFileBuffered *s,
>> s->buffer_size += size;
>> }
>>
>> -static void buffered_flush(QEMUFileBuffered *s)
>> +static int buffered_flush(QEMUFileBuffered *s)
>
> Should this be ssize_t?
Done.
> Perhaps the other way round:
>
> if (ret < 0) {
> ret2 = -1;
> }
> ...
> return ret2;
This lost the 1st errno value. The other way around we preserve it.
Later, Juan.
- Re: [Qemu-devel] [PATCH 25/41] buffered_file: make buffered_flush return the error code,
Juan Quintela <=