From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=35695 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OHhEc-0001nM-Cm for qemu-devel@nongnu.org; Thu, 27 May 2010 13:51:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OHhEb-0000rQ-D0 for qemu-devel@nongnu.org; Thu, 27 May 2010 13:51:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:19455) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OHhEb-0000rL-4N for qemu-devel@nongnu.org; Thu, 27 May 2010 13:51:09 -0400 Date: Thu, 27 May 2010 14:51:02 -0300 From: Luiz Capitulino Message-ID: <20100527145102.0de06f38@redhat.com> In-Reply-To: <1274202469-9332-7-git-send-email-miguel.filho@gmail.com> References: <1274202469-9332-1-git-send-email-miguel.filho@gmail.com> <1274202469-9332-7-git-send-email-miguel.filho@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH v4 06/10] net: vde: introduce info_dict List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Miguel Di Ciurcio Filho Cc: qemu-devel@nongnu.org, armbru@redhat.com On Tue, 18 May 2010 14:07:45 -0300 Miguel Di Ciurcio Filho wrote: > Signed-off-by: Miguel Di Ciurcio Filho > --- > net/vde.c | 11 ++++++++++- > 1 files changed, 10 insertions(+), 1 deletions(-) > > diff --git a/net/vde.c b/net/vde.c > index 0b46fa6..6a3d0ba 100644 > --- a/net/vde.c > +++ b/net/vde.c > @@ -31,6 +31,9 @@ > #include "qemu-char.h" > #include "qemu-common.h" > #include "qemu-option.h" > +#include "qdict.h" > +#include "qstring.h" > +#include "qint.h" > #include "sysemu.h" > > typedef struct VDEState { > @@ -100,7 +103,13 @@ static int net_vde_init(VLANState *vlan, const char *model, > nc = qemu_new_net_client(&net_vde_info, vlan, NULL, model, name); > > snprintf(nc->info_str, sizeof(nc->info_str), "sock=%s,fd=%d", > - sock, vde_datafd(vde)); > + sock, vde_datafd(vde)); This change is not needed. > + > + > + nc->info_dict = qdict_new(); > + qdict_put(nc->info_dict, "sock", qstring_from_str(sock)); > + qdict_put(nc->info_dict, "model", qstring_from_str("vde")); > + qdict_put(nc->info_dict, "fd", qint_from_int(vde_datafd(vde))); > > s = DO_UPCAST(VDEState, nc, nc); >