[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [PATCH v2 1/1] block: improve error handli
From: |
Sascha Silbe |
Subject: |
Re: [Qemu-block] [Qemu-devel] [PATCH v2 1/1] block: improve error handling in raw_open |
Date: |
Tue, 26 Jul 2016 20:46:55 +0200 |
User-agent: |
Notmuch/0.22.1~rc0 (http://notmuchmail.org) Emacs/24.3.1 (x86_64-pc-linux-gnu) |
Dear Max,
Max Reitz <address@hidden> writes:
>> So how about:
>>
>> /*
>> * Just like error_setg(), with @os_error info added to the message.
>> * If @os_error is non-zero, ": " + strerror(os_error) is appended to
>> * the human-readable error message.
>> + *
>> + * Reminder: errno may get clobbered by almost any function call. If
>> + * you need the value of errno for another purpose, save it before
>> + * invoking error_setg_errno() (or any other function for that
>> + * matter).
>> */
>> #define error_setg_errno(errp, os_error, fmt, ...) \
>> error_setg_errno_internal((errp), __FILE__, __LINE__, __func__, \
>> (os_error), (fmt), ## __VA_ARGS__)
>>
>> (I can prepare a proper patch if you agree with the above.)
>
> Thanks, that sounds good to me.
Great, sent out as a patch [1].
Sascha
[1] mid:address@hidden
"[PATCH] error: error_setg_errno(): errno may be clobbered" by
Sascha Silbe <address@hidden>, sent on 2016-07-26.
--
Softwareentwicklung Sascha Silbe, Niederhofenstraße 5/1, 71229 Leonberg
https://se-silbe.de/
USt-IdNr. DE281696641
- Re: [Qemu-block] [Qemu-devel] [PATCH v2 1/1] block: improve error handling in raw_open, (continued)
- Re: [Qemu-block] [Qemu-devel] [PATCH v2 1/1] block: improve error handling in raw_open, Markus Armbruster, 2016/07/27
- Re: [Qemu-block] [Qemu-devel] [PATCH v2 1/1] block: improve error handling in raw_open, Max Reitz, 2016/07/27
- Re: [Qemu-block] [Qemu-devel] [PATCH v2 1/1] block: improve error handling in raw_open, Max Reitz, 2016/07/26
- Re: [Qemu-block] [Qemu-devel] [PATCH v2 1/1] block: improve error handling in raw_open, Markus Armbruster, 2016/07/27
- Re: [Qemu-block] [Qemu-devel] [PATCH v2 1/1] block: improve error handling in raw_open, Sascha Silbe, 2016/07/26
- Re: [Qemu-block] [Qemu-devel] [PATCH v2 1/1] block: improve error handling in raw_open, Max Reitz, 2016/07/26
- Re: [Qemu-block] [Qemu-devel] [PATCH v2 1/1] block: improve error handling in raw_open,
Sascha Silbe <=
Re: [Qemu-block] [PATCH v2 1/1] block: improve error handling in raw_open, John Snow, 2016/07/26
[Qemu-block] [PATCH 1/1] block: improve error handling in raw_open, Halil Pasic, 2016/07/27