net/if_media.c: improve IFMEDIA_DEBUG output.
Use consistent output format for hex. Print both media and mask where relevant. Reviewed by: hselasky Sponsored by: Mellanox Technologies/NVidia Networking MFC after: 1 week Differential revision: https://reviews.freebsd.org/D27034
This commit is contained in:
parent
e399f19dba
commit
1fbbe9dbf5
@ -124,7 +124,7 @@ ifmedia_add(struct ifmedia *ifm, int mword, int data, void *aux)
|
|||||||
printf("ifmedia_add: null ifm\n");
|
printf("ifmedia_add: null ifm\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
printf("Adding entry for ");
|
printf("Adding entry for (%#010x) ", mword);
|
||||||
ifmedia_printword(mword);
|
ifmedia_printword(mword);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -229,8 +229,8 @@ ifmedia_ioctl(struct ifnet *ifp, struct ifreq *ifr, struct ifmedia *ifm,
|
|||||||
#ifdef IFMEDIA_DEBUG
|
#ifdef IFMEDIA_DEBUG
|
||||||
if (ifmedia_debug) {
|
if (ifmedia_debug) {
|
||||||
printf(
|
printf(
|
||||||
"ifmedia_ioctl: no media found for 0x%x\n",
|
"ifmedia_ioctl: no media found for %#010x mask %#010x\n",
|
||||||
newmedia);
|
newmedia, ifm->ifm_mask);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
return (ENXIO);
|
return (ENXIO);
|
||||||
@ -337,7 +337,7 @@ ifmedia_match(struct ifmedia *ifm, int target, int mask)
|
|||||||
#if defined(IFMEDIA_DEBUG) || defined(DIAGNOSTIC)
|
#if defined(IFMEDIA_DEBUG) || defined(DIAGNOSTIC)
|
||||||
if (match) {
|
if (match) {
|
||||||
printf("ifmedia_match: multiple match for "
|
printf("ifmedia_match: multiple match for "
|
||||||
"0x%x/0x%x\n", target, mask);
|
"%#010x/%#010x\n", target, mask);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
match = next;
|
match = next;
|
||||||
|
Loading…
Reference in New Issue
Block a user