From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O2Ptl-0003hD-Hs for qemu-devel@nongnu.org; Thu, 15 Apr 2010 10:18:29 -0400 Received: from [140.186.70.92] (port=50377 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O2Ptg-0003H8-MN for qemu-devel@nongnu.org; Thu, 15 Apr 2010 10:18:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O2Pid-0007b9-5m for qemu-devel@nongnu.org; Thu, 15 Apr 2010 10:07:04 -0400 Received: from mail-yx0-f180.google.com ([209.85.210.180]:46679) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O2Pid-0007Vy-2x for qemu-devel@nongnu.org; Thu, 15 Apr 2010 10:06:59 -0400 Received: by mail-yx0-f180.google.com with SMTP id 10so693532yxe.18 for ; Thu, 15 Apr 2010 07:06:59 -0700 (PDT) From: Miguel Di Ciurcio Filho Date: Thu, 15 Apr 2010 11:07:02 -0300 Message-Id: <1271340427-12579-8-git-send-email-miguel.filho@gmail.com> In-Reply-To: <1271340427-12579-1-git-send-email-miguel.filho@gmail.com> References: <1271340427-12579-1-git-send-email-miguel.filho@gmail.com> Subject: [Qemu-devel] [PATCH v3 07/12] net: vde: use info_dict instead of info_str List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: armbru@redhat.com, lcapitulino@redhat.com Signed-off-by: Miguel Di Ciurcio Filho --- net/vde.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/net/vde.c b/net/vde.c index 0b46fa6..f582878 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 { @@ -99,8 +102,10 @@ 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)); + nc->info_dict = qdict_new(); + + qdict_put(nc->info_dict, "sock", qstring_from_str(sock)); + qdict_put(nc->info_dict, "fd", qint_from_int(vde_datafd(vde))); s = DO_UPCAST(VDEState, nc, nc); -- 1.7.0.4