[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: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH] error: error_setg_errno(): errno may be clobbered |
Date: |
Wed, 27 Jul 2016 10:02:38 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
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 :)
> 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?
> Signed-off-by: Sascha Silbe <address@hidden>