From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45664) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yui3y-0001f2-8d for qemu-devel@nongnu.org; Tue, 19 May 2015 10:00:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yui3v-0007sV-FM for qemu-devel@nongnu.org; Tue, 19 May 2015 10:00:06 -0400 Received: from mail-wg0-x22d.google.com ([2a00:1450:400c:c00::22d]:33543) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yui3v-0007rn-8c for qemu-devel@nongnu.org; Tue, 19 May 2015 10:00:03 -0400 Received: by wgjc11 with SMTP id c11so19142234wgj.0 for ; Tue, 19 May 2015 07:00:02 -0700 (PDT) Date: Tue, 19 May 2015 14:59:59 +0100 From: Stefan Hajnoczi Message-ID: <20150519135959.GG9338@stefanha-thinkpad.redhat.com> References: <1431583614-20100-1-git-send-email-sfeldma@gmail.com> <1431583614-20100-5-git-send-email-sfeldma@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="OFj+1YLvsEfSXdCH" Content-Disposition: inline In-Reply-To: <1431583614-20100-5-git-send-email-sfeldma@gmail.com> Subject: Re: [Qemu-devel] [PATCH 4/4] qmp/hmp: add rocker device support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: sfeldma@gmail.com Cc: jiri@resnulli.us, qemu-devel@nongnu.org, dsahern@gmail.com --OFj+1YLvsEfSXdCH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, May 13, 2015 at 11:06:54PM -0700, sfeldma@gmail.com 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? --OFj+1YLvsEfSXdCH Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJVW0HfAAoJEJykq7OBq3PIclsIAILxnXYM2UGTlhbWml8t9rEr 9GXy+lOhse7UGpdp7Xk0ogYbfbLQgqMk1D41d690sRz/58IVn5z6LLC8vHaEM6TY 2XDRQokCMaOJjmibS/8aAGXrTXAJRoMBZBodXkCly25iCXGvZrt2dDN+PaGHQabb 0eh1urcQmn/neK4/pOc6gwccjLMcoQ404dtOJ2dA08e6fbnYwzu1tB8qiyTUIi68 dUdbxHXBRYfIs8noNwIuDYwYywTRspBVxAhAqZdGEFIbKww8Ja/N/YTCqUHxG9KB ATE7I0eTryX6yXI4UNr/BgINEiQOOn1rAl0QfsPXOVBT4q6D4jNwUppYiUMIGyY= =0ge1 -----END PGP SIGNATURE----- --OFj+1YLvsEfSXdCH--