From 7cb7434b1e4aee549b55536208abe56e35159763 Mon Sep 17 00:00:00 2001 From: aliguori Date: Wed, 7 Jan 2009 17:46:21 +0000 Subject: 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 Signed-off-by: Anthony Liguori git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6218 c046a42c-6fe2-441c-8c8c-71466251a162 --- hw/rtl8139.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'hw/rtl8139.c') diff --git a/hw/rtl8139.c b/hw/rtl8139.c index 39f32094ec..d51722054e 100644 --- a/hw/rtl8139.c +++ b/hw/rtl8139.c @@ -3441,14 +3441,7 @@ void pci_rtl8139_init(PCIBus *bus, NICInfo *nd, int devfn) s->vc = qemu_new_vlan_client(nd->vlan, nd->model, rtl8139_receive, rtl8139_can_receive, s); - snprintf(s->vc->info_str, sizeof(s->vc->info_str), - "rtl8139 pci macaddr=%02x:%02x:%02x:%02x:%02x:%02x", - s->macaddr[0], - s->macaddr[1], - s->macaddr[2], - s->macaddr[3], - s->macaddr[4], - s->macaddr[5]); + qemu_format_nic_info_str(s->vc, s->macaddr); s->cplus_txbuffer = NULL; s->cplus_txbuffer_len = 0; -- cgit v1.2.3