From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nzy84-0008Bt-AL for qemu-devel@nongnu.org; Thu, 08 Apr 2010 16:15:08 -0400 Received: from [140.186.70.92] (port=44315 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nzy82-0008AV-S7 for qemu-devel@nongnu.org; Thu, 08 Apr 2010 16:15:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nzy81-0004Bk-3E for qemu-devel@nongnu.org; Thu, 08 Apr 2010 16:15:06 -0400 Received: from qw-out-1920.google.com ([74.125.92.144]:10575) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nzy80-000469-ES for qemu-devel@nongnu.org; Thu, 08 Apr 2010 16:15:05 -0400 Received: by qw-out-1920.google.com with SMTP id 5so846212qwc.4 for ; Thu, 08 Apr 2010 13:15:04 -0700 (PDT) From: Miguel Di Ciurcio Filho Date: Thu, 8 Apr 2010 17:16:34 -0300 Message-Id: <1270757799-31891-18-git-send-email-miguel.filho@gmail.com> In-Reply-To: <1270757799-31891-1-git-send-email-miguel.filho@gmail.com> References: <1270757799-31891-1-git-send-email-miguel.filho@gmail.com> Subject: [Qemu-devel] [PATCH 17/22] net: dump: replace qemu_format_nic_info_str by qemu_format_nic_info_dict 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/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); -- 1.7.0.3