From patchwork Thu Apr 15 14:07:03 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: 50270 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 110B0B7D0E for ; Fri, 16 Apr 2010 01:19:43 +1000 (EST) Received: from localhost ([127.0.0.1]:57000 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O2Qqy-0001lX-2U for incoming@patchwork.ozlabs.org; Thu, 15 Apr 2010 11:19:40 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O2Ptl-0003hL-Od for qemu-devel@nongnu.org; Thu, 15 Apr 2010 10:18:29 -0400 Received: from [140.186.70.92] (port=50361 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O2Ptf-0003GA-Oq 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 1O2Piv-0007fu-Du for qemu-devel@nongnu.org; Thu, 15 Apr 2010 10:07:18 -0400 Received: from mail-yw0-f198.google.com ([209.85.211.198]:33867) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O2Piv-0007Op-AQ for qemu-devel@nongnu.org; Thu, 15 Apr 2010 10:07:17 -0400 Received: by mail-yw0-f198.google.com with SMTP id 36so720141ywh.4 for ; Thu, 15 Apr 2010 07:07:17 -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=hPkjxxivxpZiroYRPmGfjo3o7rhCWoYi2teHl4iyvow=; b=dT5/vBPM4NMWra0t3R4YXaFg/T9mdEbGy8958QPhB8irSfONcMDpyBprZbPNgqIZkE 99ZtVNhTq0haxC0FvQmJq/X4Pr3YSPSuhyVW0/FqkLL8VNEQZRd+FNgyFdN0TCVnGul1 wv41qlA1uO8j0YM4aDnyY2SqI5QPfdnrtbDy8= 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=uApxMPnDomT39jBaDVXrXgZ9WpoGsPbGL7TMBrw0y9eS1bsSoCoztNwj4FovrvjMxi HshnUnvNn+KnTZZmAfd3PdjKU+8rCzUivyxv+Xr2Yi26r2Gp4wMrnJ6eO+AD3wdOyEqC OEx/nomx91W4DSG1EIOuexU/0j1yVVmyI6qA4= Received: by 10.100.25.9 with SMTP id 9mr350574any.46.1271340420320; Thu, 15 Apr 2010 07:07:00 -0700 (PDT) Received: from localhost.localdomain (quake.ic.unicamp.br [143.106.7.51]) by mx.google.com with ESMTPS id y2sm1240378ani.4.2010.04.15.07.06.58 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 15 Apr 2010 07:06:59 -0700 (PDT) From: Miguel Di Ciurcio Filho To: qemu-devel@nongnu.org Date: Thu, 15 Apr 2010 11:07:03 -0300 Message-Id: <1271340427-12579-9-git-send-email-miguel.filho@gmail.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1271340427-12579-1-git-send-email-miguel.filho@gmail.com> References: <1271340427-12579-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 v3 08/12] net: dump: use info_dict instead of info_str 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/dump.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/net/dump.c b/net/dump.c index 6db7ecf..dea7f7d 100644 --- a/net/dump.c +++ b/net/dump.c @@ -27,6 +27,9 @@ #include "sysemu.h" #include "qemu-error.h" #include "qemu-log.h" +#include "qdict.h" +#include "qstring.h" +#include "qint.h" typedef struct DumpState { VLANClientState nc; @@ -128,8 +131,9 @@ static int net_dump_init(VLANState *vlan, const char *device, nc = qemu_new_net_client(&net_dump_info, vlan, NULL, device, name); - snprintf(nc->info_str, sizeof(nc->info_str), - "dump to %s (len=%d)", filename, len); + nc->info_dict = qdict_new(); + qdict_put(nc->info_dict, "filename", qstring_from_str(filename)); + qdict_put(nc->info_dict, "len", qint_from_int(len)); s = DO_UPCAST(DumpState, nc, nc);