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

Submitted by Miguel Di Ciurcio Filho on May 18, 2010, 5:07 p.m.

Details

Message ID 1274202469-9332-5-git-send-email-miguel.filho@gmail.com
State New
Headers show

Commit Message

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 hide | download patch | download mbox

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);