On 2/14/19 2:19 PM, Philippe Mathieu-Daudé wrote:
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> 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