qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] error: error_setg_errno(): errno may be clobber


From: Sascha Silbe
Subject: Re: [Qemu-devel] [PATCH] error: error_setg_errno(): errno may be clobbered
Date: Wed, 27 Jul 2016 11:26:57 +0200
User-agent: Notmuch/0.22.1~rc0 (http://notmuchmail.org) Emacs/24.3.1 (x86_64-pc-linux-gnu)

Dear Markus,

Markus Armbruster <address@hidden> writes:

> Sascha Silbe <address@hidden> writes:
>
>> As a general policy, we want callers to save errno
>> themselves. error_setg_internal() currently goes out of its way to
>> preserve errno,
>
> In other words, "error_setg_errno(): errno may be clobbered" is a lie :)

No, it's just standardese (though it should be in capital letters for
that) for "do not rely on it, we may change our mind any time". :)


>>                 so with the API documentation not mentioning it either
>> way, callers might come to rely on the current behaviour of the
>> implementation.
>
> According to Max, we rely on the errno-saving behavior in several places
> already, and don't intend to change them.
>
>>                 Spell out that we don't want to make that promise.
>
> Well, we already did, tacitly.  Let's make the promise explicit.  Could
> you post the patch?

Sure [1]. Like a good lawyer, I can argue either way, even within the
same case. ;)

Sascha

[1] mid:address@hidden
    "[PATCH] error: error_setg_errno(): errno gets preserved" by Sascha
    Silbe <address@hidden>, sent on 2016-07-27.
-- 
Softwareentwicklung Sascha Silbe, Niederhofenstraße 5/1, 71229 Leonberg
https://se-silbe.de/
USt-IdNr. DE281696641




reply via email to

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