diff options
author | Dunrong Huang <riegamaths@gmail.com> | 2012-08-04 19:29:55 +0800 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2012-08-04 07:54:15 -0500 |
commit | 161abfb5f929184a68baa16701606015f5683722 (patch) | |
tree | 218428f8811e34866ee0b67cd7c911b421a12585 /hw/xen_devconfig.c | |
parent | 70678b82274309e9df98b8ce359118f36697cadb (diff) | |
download | qemu-161abfb5f929184a68baa16701606015f5683722.zip qemu-161abfb5f929184a68baa16701606015f5683722.tar.gz qemu-161abfb5f929184a68baa16701606015f5683722.tar.bz2 |
build: Fix build breakage detected by buildbot
More details:
http://buildbot.b1-systems.de/qemu/builders/xen_unstable/builds/83/steps/compile/logs/stdio
VLANState has been removed since commit a005d07, so "vlan id" should be
fetched using net_hub_id_for_client().
Signed-off-by: Dunrong Huang <riegamaths@gmail.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/xen_devconfig.c')
-rw-r--r-- | hw/xen_devconfig.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/hw/xen_devconfig.c b/hw/xen_devconfig.c index 0928613..d83e8d0 100644 --- a/hw/xen_devconfig.c +++ b/hw/xen_devconfig.c @@ -123,19 +123,21 @@ int xen_config_dev_nic(NICInfo *nic) { char fe[256], be[256]; char mac[20]; + int vlan_id = -1; + net_hub_id_for_client(nic->netdev, &vlan_id); snprintf(mac, sizeof(mac), "%02x:%02x:%02x:%02x:%02x:%02x", nic->macaddr.a[0], nic->macaddr.a[1], nic->macaddr.a[2], nic->macaddr.a[3], nic->macaddr.a[4], nic->macaddr.a[5]); - xen_be_printf(NULL, 1, "config nic %d: mac=\"%s\"\n", nic->vlan->id, mac); - xen_config_dev_dirs("vif", "qnic", nic->vlan->id, fe, be, sizeof(fe)); + xen_be_printf(NULL, 1, "config nic %d: mac=\"%s\"\n", vlan_id, mac); + xen_config_dev_dirs("vif", "qnic", vlan_id, fe, be, sizeof(fe)); /* frontend */ - xenstore_write_int(fe, "handle", nic->vlan->id); + xenstore_write_int(fe, "handle", vlan_id); xenstore_write_str(fe, "mac", mac); /* backend */ - xenstore_write_int(be, "handle", nic->vlan->id); + xenstore_write_int(be, "handle", vlan_id); xenstore_write_str(be, "mac", mac); /* common stuff */ |