From patchwork Thu Apr 8 20:16:38 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miguel Di Ciurcio Filho X-Patchwork-Id: 49766 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 01E14B7D18 for ; Fri, 9 Apr 2010 07:00:27 +1000 (EST) Received: from localhost ([127.0.0.1]:60195 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nzylj-0003Oi-GV for incoming@patchwork.ozlabs.org; Thu, 08 Apr 2010 16:56:07 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nzy8F-0008MA-JP for qemu-devel@nongnu.org; Thu, 08 Apr 2010 16:15:19 -0400 Received: from [140.186.70.92] (port=44409 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nzy8E-0008LT-Bl for qemu-devel@nongnu.org; Thu, 08 Apr 2010 16:15:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nzy8D-0004Er-1o for qemu-devel@nongnu.org; Thu, 08 Apr 2010 16:15:18 -0400 Received: from qw-out-1920.google.com ([74.125.92.145]:15035) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nzy8C-00046N-V5 for qemu-devel@nongnu.org; Thu, 08 Apr 2010 16:15:17 -0400 Received: by qw-out-1920.google.com with SMTP id 5so846226qwc.4 for ; Thu, 08 Apr 2010 13:15:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references; bh=rWyvUn3DtG+A4GTuZuMfxjAeGEVqgBWNZnzEqW8+8n8=; b=tH8q6jhcRf+EqB1CvesphulC3zD9Mdr4rVbvDTdBy6wI+SssT49nhShzqJ3PWF9zZp Jez8QG6IcaB//pTIGzT6zWNYpFxj48oGz4WZPR2HQtbKYfDdTlXoFhghdq8oT00UPPMU epRsQ/7DHAERR19UyJCpD3n2Qq2uK1noTKgYI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=apVY2hmlr4FYylCaUQjtFyRvy7duO8UYqt2kPxbBvsNT62e2i8VDYDyrGHTUXKCHl9 JI7gPEeXkOvCWEdyjApvzuUZyG5kBC4nqWZLiV4a3SGS/JA9JHnGxM0RBzcoiIIw73X6 VwoV2BNDjwHeWzxEGZuhs4KEsOFimAlcBRo4A= Received: by 10.229.81.81 with SMTP id w17mr936051qck.4.1270757716636; Thu, 08 Apr 2010 13:15:16 -0700 (PDT) Received: from localhost.localdomain (quake.ic.unicamp.br [143.106.7.51]) by mx.google.com with ESMTPS id w30sm776636qce.4.2010.04.08.13.15.12 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 08 Apr 2010 13:15:16 -0700 (PDT) From: Miguel Di Ciurcio Filho To: qemu-devel@nongnu.org Date: Thu, 8 Apr 2010 17:16:38 -0300 Message-Id: <1270757799-31891-22-git-send-email-miguel.filho@gmail.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1270757799-31891-1-git-send-email-miguel.filho@gmail.com> References: <1270757799-31891-1-git-send-email-miguel.filho@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Cc: armbru@redhat.com, lcapitulino@redhat.com Subject: [Qemu-devel] [PATCH 21/22] net: vde: replace qemu_format_nic_info_str by info_dict X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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);