[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 7/9] ccid-card-passthru: Use QERR_MISSING_PAR
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v2 7/9] ccid-card-passthru: Use QERR_MISSING_PARAMETER |
Date: |
Thu, 14 Feb 2019 15:22:07 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 |
On 2/14/19 2:19 PM, Philippe Mathieu-Daudé wrote:
> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
> ---
> hw/usb/ccid-card-passthru.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/hw/usb/ccid-card-passthru.c b/hw/usb/ccid-card-passthru.c
> index 6cb8b2d26b..d63aa28584 100644
> --- a/hw/usb/ccid-card-passthru.c
> +++ b/hw/usb/ccid-card-passthru.c
> @@ -16,6 +16,7 @@
> #include "qemu/sockets.h"
> #include "ccid.h"
> #include "qapi/error.h"
> +#include "qapi/qmp/qerror.h"
>
> #define DPRINTF(card, lvl, fmt, ...) \
> do { \
> @@ -339,7 +340,7 @@ static void passthru_realize(CCIDCardState *base, Error
> **errp)
> PassthruState *card = PASSTHRU_CCID_CARD(base);
>
> if (!qemu_chr_fe_backend_connected(&card->cs)) {
> - error_setg(errp, "missing chardev");
> + error_setg(errp, QERR_MISSING_PARAMETER, "chardev");
We're trying to get rid of QERR_ usage, not add more. But this
particular one seems to be a wash:
$ git grep '"missing ' | wc -l
24
$ git grep QERR_MISSING_P | wc -l
25
so I'd be interested if Markus has an opinion on this one.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH v2 2/9] ccid-card-passthru: Replace never trigger if statement by an assertion, (continued)
- [Qemu-devel] [PATCH v2 2/9] ccid-card-passthru: Replace never trigger if statement by an assertion, Philippe Mathieu-Daudé, 2019/02/14
- [Qemu-devel] [PATCH v2 3/9] ccid-card-passthru: Assert on a stricter expression, Philippe Mathieu-Daudé, 2019/02/14
- [Qemu-devel] [PATCH v2 4/9] ccid-card-passthru: Let the chardev::read() be more generic, Philippe Mathieu-Daudé, 2019/02/14
- [Qemu-devel] [PATCH v2 5/9] ccid-card-passthru: Replace assert() by QEMU_BUILD_BUG_ON(), Philippe Mathieu-Daudé, 2019/02/14
- [Qemu-devel] [PATCH v2 7/9] ccid-card-passthru: Use QERR_MISSING_PARAMETER, Philippe Mathieu-Daudé, 2019/02/14
- Re: [Qemu-devel] [PATCH v2 7/9] ccid-card-passthru: Use QERR_MISSING_PARAMETER,
Eric Blake <=
- [Qemu-devel] [PATCH v2 6/9] ccid-card-passthru: Simplify the if() condition, Philippe Mathieu-Daudé, 2019/02/14
- [Qemu-devel] [PATCH v2 9/9] ccid-card-passthru: Use size_t for index, Philippe Mathieu-Daudé, 2019/02/14
- [Qemu-devel] [PATCH v2 8/9] ccid-card-passthru: Use size_t to hold size argument, Philippe Mathieu-Daudé, 2019/02/14