diff mbox

[v3,10/12] net: xen: use info_dict instead of info_str

Message ID 1271340427-12579-11-git-send-email-miguel.filho@gmail.com
State New
Headers show

Commit Message

Miguel Di Ciurcio Filho April 15, 2010, 2:07 p.m. UTC
Signed-off-by: Miguel Di Ciurcio Filho <miguel.filho@gmail.com>
---
 hw/xen_nic.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/hw/xen_nic.c b/hw/xen_nic.c
index 08055b8..d51839d 100644
--- a/hw/xen_nic.c
+++ b/hw/xen_nic.c
@@ -43,6 +43,8 @@ 
 #include "net/checksum.h"
 #include "net/util.h"
 #include "qemu-char.h"
+#include "qdict.h"
+#include "qstring.h"
 #include "xen_backend.h"
 
 /* ------------------------------------------------------------- */
@@ -318,8 +320,8 @@  static int net_init(struct XenDevice *xendev)
     netdev->nic = qemu_new_nic(&net_xen_info, &netdev->conf,
                                "xen", NULL, netdev);
 
-    snprintf(netdev->nic->nc.info_str, sizeof(netdev->nic->nc.info_str),
-             "nic: xenbus vif macaddr=%s", netdev->mac);
+    netdev->nic->nc.info_dict = qdict_new();
+    qdict_put(netdev->nic->nc.info_dict, "macaddr", qstring_from_str(netdev->mac));
 
     /* fill info */
     xenstore_write_be_int(&netdev->xendev, "feature-rx-copy", 1);