Patchwork [v4,04/10] net: xen: introduce info_dict

login
register
mail settings
Submitter Miguel Di Ciurcio Filho
Date May 18, 2010, 5:07 p.m.
Message ID <1274202469-9332-5-git-send-email-miguel.filho@gmail.com>
Download mbox | patch
Permalink /patch/52898/
State New
Headers show

Comments

Miguel Di Ciurcio Filho - May 18, 2010, 5:07 p.m.
Signed-off-by: Miguel Di Ciurcio Filho <miguel.filho@gmail.com>
---
 hw/xen_nic.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

Patch

diff --git a/hw/xen_nic.c b/hw/xen_nic.c
index 08055b8..1820059 100644
--- a/hw/xen_nic.c
+++ b/hw/xen_nic.c
@@ -321,6 +321,11 @@  static int net_init(struct XenDevice *xendev)
     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));
+    qdict_put(netdev->nic->nc.info_dict, "model", qstring_from_str("xen"));
+
     /* fill info */
     xenstore_write_be_int(&netdev->xendev, "feature-rx-copy", 1);
     xenstore_write_be_int(&netdev->xendev, "feature-rx-flip", 0);