diff options
author | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-01-07 17:46:21 +0000 |
---|---|---|
committer | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-01-07 17:46:21 +0000 |
commit | 7cb7434b1e4aee549b55536208abe56e35159763 (patch) | |
tree | a0aa76dfcf83f7575eab561d0cb714e09bd00d4f /hw/usb-net.c | |
parent | 676cff2940f3d34e2ef7735df0f83cce958b0d77 (diff) |
Add qemu_format_nic_info_str() (Mark McLoughlin)
Factor out a simple little function for formatting a NIC's
info_str and make all NICs use it.
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6218 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/usb-net.c')
-rw-r--r-- | hw/usb-net.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/hw/usb-net.c b/hw/usb-net.c index 40ee41b693..5539336dc8 100644 --- a/hw/usb-net.c +++ b/hw/usb-net.c @@ -1456,14 +1456,12 @@ USBDevice *usb_net_init(NICInfo *nd) s->vc = qemu_new_vlan_client(nd->vlan, nd->model, usbnet_receive, usbnet_can_receive, s); + qemu_format_nic_info_str(s->vc, s->mac); + snprintf(s->usbstring_mac, sizeof(s->usbstring_mac), "%02x%02x%02x%02x%02x%02x", 0x40, s->mac[1], s->mac[2], s->mac[3], s->mac[4], s->mac[5]); - snprintf(s->vc->info_str, sizeof(s->vc->info_str), - "usbnet macaddr=%02x:%02x:%02x:%02x:%02x:%02x", - s->mac[0], s->mac[1], s->mac[2], - s->mac[3], s->mac[4], s->mac[5]); fprintf(stderr, "usbnet: initialized mac %02x:%02x:%02x:%02x:%02x:%02x\n", s->mac[0], s->mac[1], s->mac[2], s->mac[3], s->mac[4], s->mac[5]); |