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/pcnet.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'hw/pcnet.c') diff --git a/hw/pcnet.c b/hw/pcnet.c index e961a06..5b45956 100644 --- a/hw/pcnet.c +++ b/hw/pcnet.c @@ -1939,14 +1939,7 @@ static void pcnet_common_init(PCNetState *d, NICInfo *nd, const char *info_str) d->vc = qemu_new_vlan_client(nd->vlan, nd->model, pcnet_receive, pcnet_can_receive, d); - snprintf(d->vc->info_str, sizeof(d->vc->info_str), - "pcnet macaddr=%02x:%02x:%02x:%02x:%02x:%02x", - d->nd->macaddr[0], - d->nd->macaddr[1], - d->nd->macaddr[2], - d->nd->macaddr[3], - d->nd->macaddr[4], - d->nd->macaddr[5]); + qemu_format_nic_info_str(d->vc, d->nd->macaddr); } else { d->vc = NULL; } -- cgit v1.1