Deleted Added
full compact
32c32
< __FBSDID("$FreeBSD: head/sys/compat/linux/linux_ioctl.c 272059 2014-09-24 08:18:11Z mav $");
---
> __FBSDID("$FreeBSD: head/sys/compat/linux/linux_ioctl.c 283421 2015-05-24 15:51:18Z dchagin $");
72d71
< #include <net/vnet.h>
2112,2139d2110
< * Interface function used by linprocfs (at the time of writing). It's not
< * used by the Linuxulator itself.
< */
< int
< linux_ifname(struct ifnet *ifp, char *buffer, size_t buflen)
< {
< struct ifnet *ifscan;
< int ethno;
<
< IFNET_RLOCK_ASSERT();
<
< /* Short-circuit non ethernet interfaces */
< if (!IFP_IS_ETH(ifp))
< return (strlcpy(buffer, ifp->if_xname, buflen));
<
< /* Determine the (relative) unit number for ethernet interfaces */
< ethno = 0;
< TAILQ_FOREACH(ifscan, &V_ifnet, if_link) {
< if (ifscan == ifp)
< return (snprintf(buffer, buflen, "eth%d", ethno));
< if (IFP_IS_ETH(ifscan))
< ethno++;
< }
<
< return (0);
< }
<
< /*