PERFORCE change 154119 for review

Marko Zec zec at FreeBSD.org
Fri Dec 5 09:19:17 PST 2008


http://perforce.freebsd.org/chv.cgi?CH=154119

Change 154119 by zec at zec_tpx32 on 2008/12/05 17:18:36

	Use if_initname() not sprintf() and own format when renaming
	ifnets landing back in their home vnet.
	
	Suggested by:	brooks

Affected files ...

.. //depot/projects/vimage/src/sys/kern/kern_vimage.c#69 edit

Differences ...

==== //depot/projects/vimage/src/sys/kern/kern_vimage.c#69 (text+ko) ====

@@ -330,8 +330,7 @@
 	/* Rename the ifnet */
 	if (new_vnet == ifp->if_home_vnet) {
 		/* always restore the original name on return to home vnet */
-		snprintf(ifp->if_xname, IFNAMSIZ, "%s%d", ifp->if_dname,
-		    ifp->if_dunit);
+		if_initname(ifp, ifp->if_dname, ifp->if_dunit);
 	} else {
 		int unit = 0;
 		struct ifnet *iter;


More information about the p4-projects mailing list