From patchwork Tue May 18 17:07:46 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: 52902 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 507FAB7D84 for ; Wed, 19 May 2010 03:34:29 +1000 (EST) Received: from localhost ([127.0.0.1]:36795 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OEQgT-0006hc-TV for incoming@patchwork.ozlabs.org; Tue, 18 May 2010 13:34:26 -0400 Received: from [140.186.70.92] (port=38523 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OEQRa-0005iD-Lt for qemu-devel@nongnu.org; Tue, 18 May 2010 13:19:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OEQHI-0005UG-0d for qemu-devel@nongnu.org; Tue, 18 May 2010 13:08:27 -0400 Received: from mail-gw0-f45.google.com ([74.125.83.45]:54418) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OEQHH-0005S8-SS for qemu-devel@nongnu.org; Tue, 18 May 2010 13:08:23 -0400 Received: by mail-gw0-f45.google.com with SMTP id 17so2097897gwj.4 for ; Tue, 18 May 2010 10:08:23 -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=t33vOVMbqkNnP/JCldnKfeuoX0RJ5+hcqk4PbPHJc0U=; b=iwZVnCGC8E8b8TgaKdtMDkfHGWXBc5M+N3F1U1hGF6PHIwJcvW4Drs8YKWekjykI3G HubKAt+qx+zK6WRm5yImBLrAXP+l8qstgrIYQCtv79GCsb1O8sLi14gUsQ9oy7Fmcf7w kLZBW7cmi0MK0h/4TZsxQkWdZ917DjysanEeA= 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=YgxKt0BNIgsj5fp0JnIjwXhUWNBSy7EGAcJ+ovUeB2xqUAd3dNAJOznGQ2wewteDV7 CjXtOduclu56WYtji1W7SY1Z/EGYlK2cTA4CT7+ZwnvbJqcHkkJ0V18To79esYkR/B1M cL6rKlQpumyz6O0p/lu3/S0c5XLzVwJGJSZYY= Received: by 10.150.213.14 with SMTP id l14mr8776222ybg.241.1274202503561; Tue, 18 May 2010 10:08:23 -0700 (PDT) Received: from localhost.localdomain (quake.ic.unicamp.br [143.106.7.51]) by mx.google.com with ESMTPS id k30sm58427272ybb.19.2010.05.18.10.08.21 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 18 May 2010 10:08:22 -0700 (PDT) From: Miguel Di Ciurcio Filho To: qemu-devel@nongnu.org Date: Tue, 18 May 2010 14:07:46 -0300 Message-Id: <1274202469-9332-8-git-send-email-miguel.filho@gmail.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1274202469-9332-1-git-send-email-miguel.filho@gmail.com> References: <1274202469-9332-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 v4 07/10] net: dump: introduce 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/dump.c | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/net/dump.c b/net/dump.c index 6db7ecf..32514ad 100644 --- a/net/dump.c +++ b/net/dump.c @@ -26,6 +26,9 @@ #include "qemu-common.h" #include "sysemu.h" #include "qemu-error.h" +#include "qdict.h" +#include "qstring.h" +#include "qint.h" #include "qemu-log.h" typedef struct DumpState { @@ -129,7 +132,12 @@ 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); + "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)); + qdict_put(nc->info_dict, "model", qstring_from_str("dump")); s = DO_UPCAST(DumpState, nc, nc);