qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 2/5] block/raw-posix: Employ error parameter


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH 2/5] block/raw-posix: Employ error parameter
Date: Fri, 11 Oct 2013 13:01:43 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)

Kevin Wolf <address@hidden> writes:

> Am 10.10.2013 um 15:44 hat Max Reitz geschrieben:
>> Make use of the error parameter in the opening and creating functions in
>> block/raw-posix.c.
>> 
>> Signed-off-by: Max Reitz <address@hidden>
>> ---
>>  block/raw-posix.c | 60
>> ++++++++++++++++++++++++++++++++++++++++++++-----------
>>  1 file changed, 48 insertions(+), 12 deletions(-)
>
> You forgot updating a raw_open_common() caller which is compiled out
> on your system. Builds will fail on FreeBSD now.
>
>> @@ -1059,12 +1069,15 @@ static int raw_create(const char *filename, 
>> QEMUOptionParameter *options,
>>      fd = qemu_open(filename, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY,
>>                     0644);
>>      if (fd < 0) {
>> +        error_setg_errno(errp, errno, "Could not create file");
>>          result = -errno;
>
> Doesn't error_setg_errno() change the value of errno? (More instances
> follow.)

It does.  Easy enough to avoid if it turns out to be inconvenient.



reply via email to

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