qemu-devel
[Top][All Lists]
Advanced

[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

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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