Use if_printf(ifp, "blah") instead of

printf("%s%d: blah", ifp->if_name, ifp->if_xname).
This commit is contained in:
Brooks Davis 2002-10-21 02:51:56 +00:00
parent f09b82aa1a
commit 29e1b85f97
15 changed files with 15 additions and 29 deletions

View file

@ -2753,8 +2753,7 @@ mac_check_ifnet_transmit(struct ifnet *ifnet, struct mbuf *mbuf)
KASSERT(mbuf->m_flags & M_PKTHDR, ("packet has no pkthdr"));
if (!(mbuf->m_pkthdr.label.l_flags & MAC_FLAG_INITIALIZED))
printf("%s%d: not initialized\n", ifnet->if_name,
ifnet->if_unit);
if_printf(ifnet, "not initialized\n");
MAC_CHECK(check_ifnet_transmit, ifnet, &ifnet->if_label, mbuf,
&mbuf->m_pkthdr.label);

View file

@ -288,8 +288,7 @@ bpf_detachd(d)
* the driver into promiscuous mode, but can't
* take it out.
*/
printf("%s%d: ifpromisc failed %d\n",
bp->bif_ifp->if_name, bp->bif_ifp->if_unit, error);
if_printf(bp->bif_ifp, "ifpromisc failed %d\n", error);
}
}
/* Remove d from the interface's descriptor list. */

View file

@ -196,8 +196,7 @@ arc_output(ifp, m, dst, rt0)
break;
default:
printf("%s%d: can't handle af%d\n", ifp->if_name, ifp->if_unit,
dst->sa_family);
if_printf(ifp, "can't handle af%d\n", dst->sa_family);
senderr(EAFNOSUPPORT);
}

View file

@ -307,8 +307,7 @@ ether_output(ifp, m, dst, rt0)
break;
default:
printf("%s%d: can't handle af%d\n", ifp->if_name, ifp->if_unit,
dst->sa_family);
if_printf(ifp, "can't handle af%d\n", dst->sa_family);
senderr(EAFNOSUPPORT);
}

View file

@ -280,8 +280,7 @@ fddi_output(ifp, m, dst, rt0)
goto queue_it;
}
default:
printf("%s%d: can't handle af%d\n", ifp->if_name, ifp->if_unit,
dst->sa_family);
if_printf(ifp, "can't handle af%d\n", dst->sa_family);
senderr(EAFNOSUPPORT);
}

View file

@ -335,8 +335,7 @@ iso88025_output(ifp, m, dst, rt0)
break;
}
default:
printf("%s%d: can't handle af%d\n", ifp->if_name, ifp->if_unit,
dst->sa_family);
if_printf(ifp, "can't handle af%d\n", dst->sa_family);
senderr(EAFNOSUPPORT);
break;
}

View file

@ -471,7 +471,7 @@ ng_iface_output(struct ifnet *ifp, struct mbuf *m,
static void
ng_iface_start(struct ifnet *ifp)
{
printf("%s%d: %s called?", ifp->if_name, ifp->if_unit, __func__);
if_printf(ifp, "%s called?", __func__);
}
/*

View file

@ -2753,8 +2753,7 @@ mac_check_ifnet_transmit(struct ifnet *ifnet, struct mbuf *mbuf)
KASSERT(mbuf->m_flags & M_PKTHDR, ("packet has no pkthdr"));
if (!(mbuf->m_pkthdr.label.l_flags & MAC_FLAG_INITIALIZED))
printf("%s%d: not initialized\n", ifnet->if_name,
ifnet->if_unit);
if_printf(ifnet, "not initialized\n");
MAC_CHECK(check_ifnet_transmit, ifnet, &ifnet->if_label, mbuf,
&mbuf->m_pkthdr.label);

View file

@ -2753,8 +2753,7 @@ mac_check_ifnet_transmit(struct ifnet *ifnet, struct mbuf *mbuf)
KASSERT(mbuf->m_flags & M_PKTHDR, ("packet has no pkthdr"));
if (!(mbuf->m_pkthdr.label.l_flags & MAC_FLAG_INITIALIZED))
printf("%s%d: not initialized\n", ifnet->if_name,
ifnet->if_unit);
if_printf(ifnet, "not initialized\n");
MAC_CHECK(check_ifnet_transmit, ifnet, &ifnet->if_label, mbuf,
&mbuf->m_pkthdr.label);

View file

@ -2753,8 +2753,7 @@ mac_check_ifnet_transmit(struct ifnet *ifnet, struct mbuf *mbuf)
KASSERT(mbuf->m_flags & M_PKTHDR, ("packet has no pkthdr"));
if (!(mbuf->m_pkthdr.label.l_flags & MAC_FLAG_INITIALIZED))
printf("%s%d: not initialized\n", ifnet->if_name,
ifnet->if_unit);
if_printf(ifnet, "not initialized\n");
MAC_CHECK(check_ifnet_transmit, ifnet, &ifnet->if_label, mbuf,
&mbuf->m_pkthdr.label);

View file

@ -2753,8 +2753,7 @@ mac_check_ifnet_transmit(struct ifnet *ifnet, struct mbuf *mbuf)
KASSERT(mbuf->m_flags & M_PKTHDR, ("packet has no pkthdr"));
if (!(mbuf->m_pkthdr.label.l_flags & MAC_FLAG_INITIALIZED))
printf("%s%d: not initialized\n", ifnet->if_name,
ifnet->if_unit);
if_printf(ifnet, "not initialized\n");
MAC_CHECK(check_ifnet_transmit, ifnet, &ifnet->if_label, mbuf,
&mbuf->m_pkthdr.label);

View file

@ -2753,8 +2753,7 @@ mac_check_ifnet_transmit(struct ifnet *ifnet, struct mbuf *mbuf)
KASSERT(mbuf->m_flags & M_PKTHDR, ("packet has no pkthdr"));
if (!(mbuf->m_pkthdr.label.l_flags & MAC_FLAG_INITIALIZED))
printf("%s%d: not initialized\n", ifnet->if_name,
ifnet->if_unit);
if_printf(ifnet, "not initialized\n");
MAC_CHECK(check_ifnet_transmit, ifnet, &ifnet->if_label, mbuf,
&mbuf->m_pkthdr.label);

View file

@ -2753,8 +2753,7 @@ mac_check_ifnet_transmit(struct ifnet *ifnet, struct mbuf *mbuf)
KASSERT(mbuf->m_flags & M_PKTHDR, ("packet has no pkthdr"));
if (!(mbuf->m_pkthdr.label.l_flags & MAC_FLAG_INITIALIZED))
printf("%s%d: not initialized\n", ifnet->if_name,
ifnet->if_unit);
if_printf(ifnet, "not initialized\n");
MAC_CHECK(check_ifnet_transmit, ifnet, &ifnet->if_label, mbuf,
&mbuf->m_pkthdr.label);

View file

@ -2753,8 +2753,7 @@ mac_check_ifnet_transmit(struct ifnet *ifnet, struct mbuf *mbuf)
KASSERT(mbuf->m_flags & M_PKTHDR, ("packet has no pkthdr"));
if (!(mbuf->m_pkthdr.label.l_flags & MAC_FLAG_INITIALIZED))
printf("%s%d: not initialized\n", ifnet->if_name,
ifnet->if_unit);
if_printf(ifnet, "not initialized\n");
MAC_CHECK(check_ifnet_transmit, ifnet, &ifnet->if_label, mbuf,
&mbuf->m_pkthdr.label);

View file

@ -2753,8 +2753,7 @@ mac_check_ifnet_transmit(struct ifnet *ifnet, struct mbuf *mbuf)
KASSERT(mbuf->m_flags & M_PKTHDR, ("packet has no pkthdr"));
if (!(mbuf->m_pkthdr.label.l_flags & MAC_FLAG_INITIALIZED))
printf("%s%d: not initialized\n", ifnet->if_name,
ifnet->if_unit);
if_printf(ifnet, "not initialized\n");
MAC_CHECK(check_ifnet_transmit, ifnet, &ifnet->if_label, mbuf,
&mbuf->m_pkthdr.label);