[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 01/11] qom: Reduce use of error_propagate()
From: |
Markus Armbruster |
Subject: |
Re: [PATCH 01/11] qom: Reduce use of error_propagate() |
Date: |
Fri, 24 Sep 2021 16:04:10 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) |
Kevin Wolf <kwolf@redhat.com> writes:
> ERRP_GUARD() makes debugging easier by making sure that &error_abort
> still fails at the real origin of the error instead of
> error_propagate().
>
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Yes.
The code you patch uses error_propagate() to work around functions not
returning distinct error values. error.h's big comment recommends such
return values, but recommendations don't update code, patches do.
Until then, ERRP_GUARD() is clearly a better crutch than
error_propagate().
Reviewed-by: Markus Armbruster <armbru@redhat.com>
- [PATCH 00/11] qdev: Add JSON -device and fix QMP device_add, Kevin Wolf, 2021/09/24
- [PATCH 01/11] qom: Reduce use of error_propagate(), Kevin Wolf, 2021/09/24
- [PATCH 02/11] iotests/245: Fix type for iothread property, Kevin Wolf, 2021/09/24
- [PATCH 03/11] iotests/051: Fix typo, Kevin Wolf, 2021/09/24
- [PATCH 04/11] qdev: Avoid using string visitor for properties, Kevin Wolf, 2021/09/24
- [PATCH 05/11] qdev: Make DeviceState.id independent of QemuOpts, Kevin Wolf, 2021/09/24