qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 4/4] qmp/hmp: add rocker device support


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH 4/4] qmp/hmp: add rocker device support
Date: Tue, 19 May 2015 14:59:59 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

On Wed, May 13, 2015 at 11:06:54PM -0700, address@hidden wrote:
> diff --git a/Makefile.target b/Makefile.target
> index 1083377..f11dba4 100644
> --- a/Makefile.target
> +++ b/Makefile.target
> @@ -131,6 +131,7 @@ obj-y += qtest.o bootdevice.o
>  obj-y += hw/
>  obj-$(CONFIG_FDT) += device_tree.o
>  obj-$(CONFIG_KVM) += kvm-all.o
> +obj-$(call lnot,$(CONFIG_ROCKER)) += hw/net/rocker/qmp-norocker.o

Is there a reason for putting this in Makefile.target instead of
hw/Makefile.objs alongside the other rocker object file references?

> +void hmp_rocker(Monitor *mon, const QDict *qdict)
> +{
> +    const char *name = qdict_get_str(qdict, "name");
> +    RockerSwitch *rocker;
> +    Error *errp = NULL;
> +
> +    rocker = qmp_query_rocker(name, &errp);
> +    if (errp != NULL) {
> +        hmp_handle_error(mon, &errp);
> +        return;
> +    }
> +
> +    monitor_printf(mon, "name: %s\n", rocker->name);
> +    monitor_printf(mon, "id: 0x%016lx\n", rocker->id);

The format specifier probably needs to be PRIx64 since long is only
32-bit on 32-bit builds.

> diff --git a/qapi-schema.json b/qapi-schema.json
> index 9c92482..5c47a4f 100644
> --- a/qapi-schema.json
> +++ b/qapi-schema.json
> @@ -3759,3 +3759,6 @@
>  # Since: 2.1
>  ##
>  { 'command': 'rtc-reset-reinjection' }
> +
> +# Rocker ethernet network switch
> +{ 'include': 'qapi/rocker.json' }

I don't see qapi/rocker.json, did you forget to git add the file?

Attachment: pgpo1j3_sP9gK.pgp
Description: PGP signature


reply via email to

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