Date: Sun, 1 Nov 2020 16:38:31 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367252 - head/sys/net Message-ID: <202011011638.0A1GcVcp028267@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Sun Nov 1 16:38:30 2020 New Revision: 367252 URL: https://svnweb.freebsd.org/changeset/base/367252 Log: 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 Modified: head/sys/net/if_media.c Modified: head/sys/net/if_media.c ============================================================================== --- head/sys/net/if_media.c Sun Nov 1 16:36:21 2020 (r367251) +++ head/sys/net/if_media.c Sun Nov 1 16:38:30 2020 (r367252) @@ -124,7 +124,7 @@ ifmedia_add(struct ifmedia *ifm, int mword, int data, printf("ifmedia_add: null ifm\n"); return; } - printf("Adding entry for "); + printf("Adding entry for (%#010x) ", mword); ifmedia_printword(mword); } #endif @@ -229,8 +229,8 @@ ifmedia_ioctl(struct ifnet *ifp, struct ifreq *ifr, st #ifdef IFMEDIA_DEBUG if (ifmedia_debug) { printf( - "ifmedia_ioctl: no media found for 0x%x\n", - newmedia); + "ifmedia_ioctl: no media found for %#010x mask %#010x\n", + newmedia, ifm->ifm_mask); } #endif return (ENXIO); @@ -337,7 +337,7 @@ ifmedia_match(struct ifmedia *ifm, int target, int mas #if defined(IFMEDIA_DEBUG) || defined(DIAGNOSTIC) if (match) { printf("ifmedia_match: multiple match for " - "0x%x/0x%x\n", target, mask); + "%#010x/%#010x\n", target, mask); } #endif match = next;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202011011638.0A1GcVcp028267>