Use new printf features rather than local kludges.

This commit is contained in:
Poul-Henning Kamp 1996-01-24 21:12:23 +00:00
parent 120f078334
commit 1ce9bf88c3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=13619
11 changed files with 43 additions and 140 deletions

View File

@ -29,7 +29,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
* *
* $Id: if_ed.c,v 1.91 1995/12/15 00:54:07 bde Exp $ * $Id: if_ed.c,v 1.92 1995/12/15 07:31:40 davidg Exp $
*/ */
/* /*
@ -1465,8 +1465,8 @@ ed_attach(isa_dev)
/* /*
* Print additional info when attached * Print additional info when attached
*/ */
printf("ed%d: address %s, ", isa_dev->id_unit, printf("ed%d: address %6D, ", isa_dev->id_unit,
ether_sprintf(sc->arpcom.ac_enaddr)); sc->arpcom.ac_enaddr, ":");
if (sc->type_str && (*sc->type_str != 0)) if (sc->type_str && (*sc->type_str != 0))
printf("type %s ", sc->type_str); printf("type %s ", sc->type_str);

View File

@ -29,7 +29,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
* *
* $Id: if_ed.c,v 1.91 1995/12/15 00:54:07 bde Exp $ * $Id: if_ed.c,v 1.92 1995/12/15 07:31:40 davidg Exp $
*/ */
/* /*
@ -1465,8 +1465,8 @@ ed_attach(isa_dev)
/* /*
* Print additional info when attached * Print additional info when attached
*/ */
printf("ed%d: address %s, ", isa_dev->id_unit, printf("ed%d: address %6D, ", isa_dev->id_unit,
ether_sprintf(sc->arpcom.ac_enaddr)); sc->arpcom.ac_enaddr, ":");
if (sc->type_str && (*sc->type_str != 0)) if (sc->type_str && (*sc->type_str != 0))
printf("type %s ", sc->type_str); printf("type %s ", sc->type_str);

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE. * SUCH DAMAGE.
* *
* @(#)if.c 8.3 (Berkeley) 1/4/94 * @(#)if.c 8.3 (Berkeley) 1/4/94
* $Id: if.c,v 1.24 1995/12/09 20:47:08 phk Exp $ * $Id: if.c,v 1.25 1995/12/20 21:53:38 wollman Exp $
*/ */
#include <sys/param.h> #include <sys/param.h>
@ -62,7 +62,6 @@ static void ifinit __P((void *));
static void if_qflush __P((struct ifqueue *)); static void if_qflush __P((struct ifqueue *));
static void if_slowtimo __P((void *)); static void if_slowtimo __P((void *));
static void link_rtrequest __P((int, struct rtentry *, struct sockaddr *)); static void link_rtrequest __P((int, struct rtentry *, struct sockaddr *));
static char *sprint_d __P((u_int, char *, int));
SYSINIT(interfaces, SI_SUB_PROTO_IF, SI_ORDER_FIRST, ifinit, NULL) SYSINIT(interfaces, SI_SUB_PROTO_IF, SI_ORDER_FIRST, ifinit, NULL)
@ -104,8 +103,8 @@ if_attach(ifp)
struct ifnet *ifp; struct ifnet *ifp;
{ {
unsigned socksize, ifasize; unsigned socksize, ifasize;
int namelen, unitlen, masklen; int namelen, masklen;
char workbuf[12], *unitname; char workbuf[64];
register struct ifnet **p = &ifnet; register struct ifnet **p = &ifnet;
register struct sockaddr_dl *sdl; register struct sockaddr_dl *sdl;
register struct ifaddr *ifa; register struct ifaddr *ifa;
@ -130,12 +129,9 @@ if_attach(ifp)
/* /*
* create a Link Level name for this device * create a Link Level name for this device
*/ */
unitname = sprint_d((u_int)ifp->if_unit, workbuf, sizeof(workbuf)); namelen = sprintf(workbuf, "%s%d", ifp->if_name, ifp->if_unit);
namelen = strlen(ifp->if_name);
unitlen = strlen(unitname);
#define _offsetof(t, m) ((int)((caddr_t)&((t *)0)->m)) #define _offsetof(t, m) ((int)((caddr_t)&((t *)0)->m))
masklen = _offsetof(struct sockaddr_dl, sdl_data[0]) + masklen = _offsetof(struct sockaddr_dl, sdl_data[0]) + namelen;
unitlen + namelen;
socksize = masklen + ifp->if_addrlen; socksize = masklen + ifp->if_addrlen;
#define ROUNDUP(a) (1 + (((a) - 1) | (sizeof(long) - 1))) #define ROUNDUP(a) (1 + (((a) - 1) | (sizeof(long) - 1)))
socksize = ROUNDUP(socksize); socksize = ROUNDUP(socksize);
@ -148,9 +144,8 @@ if_attach(ifp)
sdl = (struct sockaddr_dl *)(ifa + 1); sdl = (struct sockaddr_dl *)(ifa + 1);
sdl->sdl_len = socksize; sdl->sdl_len = socksize;
sdl->sdl_family = AF_LINK; sdl->sdl_family = AF_LINK;
bcopy(ifp->if_name, sdl->sdl_data, namelen); bcopy(workbuf, sdl->sdl_data, namelen);
bcopy(unitname, namelen + (caddr_t)sdl->sdl_data, unitlen); sdl->sdl_nlen = namelen;
sdl->sdl_nlen = (namelen += unitlen);
sdl->sdl_index = ifp->if_index; sdl->sdl_index = ifp->if_index;
sdl->sdl_type = ifp->if_type; sdl->sdl_type = ifp->if_type;
ifnet_addrs[if_index - 1] = ifa; ifnet_addrs[if_index - 1] = ifa;
@ -159,6 +154,7 @@ if_attach(ifp)
ifa->ifa_rtrequest = link_rtrequest; ifa->ifa_rtrequest = link_rtrequest;
ifp->if_addrlist = ifa; ifp->if_addrlist = ifa;
ifa->ifa_addr = (struct sockaddr *)sdl; ifa->ifa_addr = (struct sockaddr *)sdl;
sdl = (struct sockaddr_dl *)(socksize + (caddr_t)sdl); sdl = (struct sockaddr_dl *)(socksize + (caddr_t)sdl);
ifa->ifa_netmask = (struct sockaddr *)sdl; ifa->ifa_netmask = (struct sockaddr *)sdl;
sdl->sdl_len = masklen; sdl->sdl_len = masklen;
@ -681,17 +677,14 @@ ifconf(cmd, data)
ifrp = ifc->ifc_req; ifrp = ifc->ifc_req;
for (; space > sizeof (ifr) && ifp; ifp = ifp->if_next) { for (; space > sizeof (ifr) && ifp; ifp = ifp->if_next) {
char workbuf[12], *unitname; char workbuf[64];
int unitlen, ifnlen; int ifnlen;
unitname = sprint_d(ifp->if_unit, workbuf, sizeof workbuf); ifnlen = sprintf(workbuf, "%s%d", ifp->if_name, ifp->if_unit);
unitlen = strlen(unitname); if(ifnlen + 1 > sizeof ifr.ifr_name) {
ifnlen = strlen(ifp->if_name);
if(unitlen + ifnlen + 1 > sizeof ifr.ifr_name) {
error = ENAMETOOLONG; error = ENAMETOOLONG;
} else { } else {
strcpy(ifr.ifr_name, ifp->if_name); strcpy(ifr.ifr_name, workbuf);
strcpy(&ifr.ifr_name[ifnlen], unitname);
} }
if ((ifa = ifp->if_addrlist) == 0) { if ((ifa = ifp->if_addrlist) == 0) {
@ -741,21 +734,4 @@ ifconf(cmd, data)
return (error); return (error);
} }
static char *
sprint_d(n, buf, buflen)
u_int n;
char *buf;
int buflen;
{
register char *cp = buf + buflen - 1;
*cp = 0;
do {
cp--;
*cp = "0123456789"[n % 10];
n /= 10;
} while (n != 0);
return (cp);
}
SYSCTL_NODE(_net, PF_LINK, link, CTLFLAG_RW, 0, "Link layers"); SYSCTL_NODE(_net, PF_LINK, link, CTLFLAG_RW, 0, "Link layers");

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE. * SUCH DAMAGE.
* *
* @(#)if_ethersubr.c 8.1 (Berkeley) 6/10/93 * @(#)if_ethersubr.c 8.1 (Berkeley) 6/10/93
* $Id: if_ethersubr.c,v 1.12 1995/12/09 20:47:11 phk Exp $ * $Id: if_ethersubr.c,v 1.13 1995/12/20 21:53:40 wollman Exp $
*/ */
#include <sys/param.h> #include <sys/param.h>
@ -486,27 +486,6 @@ ether_input(ifp, eh, m)
splx(s); splx(s);
} }
/*
* Convert Ethernet address to printable (loggable) representation.
*/
static char digits[] = "0123456789abcdef";
char *
ether_sprintf(ap)
register u_char *ap;
{
register i;
static char etherbuf[18];
register char *cp = etherbuf;
for (i = 0; i < 6; i++) {
*cp++ = digits[*ap >> 4];
*cp++ = digits[*ap++ & 0xf];
*cp++ = ':';
}
*--cp = 0;
return (etherbuf);
}
/* /*
* Perform common duties while attaching to interface list * Perform common duties while attaching to interface list
*/ */

View File

@ -69,7 +69,7 @@
* Paul Mackerras (paulus@cs.anu.edu.au). * Paul Mackerras (paulus@cs.anu.edu.au).
*/ */
/* $Id: if_ppp.c,v 1.28 1995/11/13 22:09:39 peter Exp $ */ /* $Id: if_ppp.c,v 1.29 1995/12/14 09:53:13 phk Exp $ */
/* from if_ppp.c,v 1.5 1995/08/16 01:36:38 paulus Exp */ /* from if_ppp.c,v 1.5 1995/08/16 01:36:38 paulus Exp */
/* from if_sl.c,v 1.11 84/10/04 12:54:47 rick Exp */ /* from if_sl.c,v 1.11 84/10/04 12:54:47 rick Exp */
@ -1413,7 +1413,6 @@ pppdumpm(m0)
char buf[3*MAX_DUMP_BYTES+4]; char buf[3*MAX_DUMP_BYTES+4];
char *bp = buf; char *bp = buf;
struct mbuf *m; struct mbuf *m;
static char digits[] = "0123456789abcdef";
for (m = m0; m; m = m->m_next) { for (m = m0; m; m = m->m_next) {
int l = m->m_len; int l = m->m_len;
@ -1422,8 +1421,8 @@ pppdumpm(m0)
while (l--) { while (l--) {
if (bp > buf + sizeof(buf) - 4) if (bp > buf + sizeof(buf) - 4)
goto done; goto done;
*bp++ = digits[*rptr >> 4]; /* convert byte to ascii hex */ *bp++ = hex2ascii(*rptr >> 4);
*bp++ = digits[*rptr++ & 0xf]; *bp++ = hex2ascii(*rptr++ & 0xf);
} }
if (m->m_next) { if (m->m_next) {

View File

@ -70,7 +70,7 @@
* Paul Mackerras (paulus@cs.anu.edu.au). * Paul Mackerras (paulus@cs.anu.edu.au).
*/ */
/* $Id: ppp_tty.c,v 1.3 1995/11/01 00:58:43 peter Exp $ */ /* $Id: ppp_tty.c,v 1.4 1995/12/14 09:53:20 phk Exp $ */
/* from Id: ppp_tty.c,v 1.3 1995/08/16 01:36:40 paulus Exp */ /* from Id: ppp_tty.c,v 1.3 1995/08/16 01:36:40 paulus Exp */
/* from if_sl.c,v 1.11 84/10/04 12:54:47 rick Exp */ /* from if_sl.c,v 1.11 84/10/04 12:54:47 rick Exp */
@ -134,7 +134,6 @@ static void pppasyncrelinq __P((struct ppp_softc *));
static void pppasyncsetmtu __P((struct ppp_softc *)); static void pppasyncsetmtu __P((struct ppp_softc *));
static void ppp_timeout __P((void *)); static void ppp_timeout __P((void *));
static void pppgetm __P((struct ppp_softc *sc)); static void pppgetm __P((struct ppp_softc *sc));
static void pppdumpb __P((u_char *b, int l));
static void ppplogchar __P((struct ppp_softc *, int)); static void ppplogchar __P((struct ppp_softc *, int));
/* /*
@ -1100,33 +1099,10 @@ ppplogchar(sc, c)
sc->sc_rawin[sc->sc_rawin_count++] = c; sc->sc_rawin[sc->sc_rawin_count++] = c;
if (sc->sc_rawin_count >= sizeof(sc->sc_rawin) if (sc->sc_rawin_count >= sizeof(sc->sc_rawin)
|| c < 0 && sc->sc_rawin_count > 0) { || c < 0 && sc->sc_rawin_count > 0) {
printf("ppp%d input: ", sc->sc_if.if_unit); printf("ppp%d input: %*D", sc->sc_if.if_unit,
pppdumpb(sc->sc_rawin, sc->sc_rawin_count); sc->sc_rawin_count, sc->sc_rawin, " ");
sc->sc_rawin_count = 0; sc->sc_rawin_count = 0;
} }
} }
static void
pppdumpb(b, l)
u_char *b;
int l;
{
char buf[3*MAX_DUMP_BYTES+4];
char *bp = buf;
static char digits[] = "0123456789abcdef";
while (l--) {
if (bp >= buf + sizeof(buf) - 3) {
*bp++ = '>';
break;
}
*bp++ = digits[*b >> 4]; /* convert byte to ascii hex */
*bp++ = digits[*b++ & 0xf];
*bp++ = ' ';
}
*bp = 0;
printf("%s\n", buf);
}
#endif /* NPPP > 0 */ #endif /* NPPP > 0 */

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE. * SUCH DAMAGE.
* *
* @(#)if_ether.c 8.1 (Berkeley) 6/10/93 * @(#)if_ether.c 8.1 (Berkeley) 6/10/93
* $Id: if_ether.c,v 1.24 1995/12/16 00:05:40 bde Exp $ * $Id: if_ether.c,v 1.25 1995/12/20 21:53:51 wollman Exp $
*/ */
/* /*
@ -465,8 +465,8 @@ in_arpinput(m)
} }
if (isaddr.s_addr == myaddr.s_addr) { if (isaddr.s_addr == myaddr.s_addr) {
log(LOG_ERR, log(LOG_ERR,
"duplicate IP address %s! sent from ethernet address: %s\n", "duplicate IP address %s! sent from ethernet address: %6D\n",
inet_ntoa(isaddr), ether_sprintf(ea->arp_sha)); inet_ntoa(isaddr), ea->arp_sha, ":");
itaddr = myaddr; itaddr = myaddr;
goto reply; goto reply;
} }
@ -474,8 +474,8 @@ in_arpinput(m)
if (la && (rt = la->la_rt) && (sdl = SDL(rt->rt_gateway))) { if (la && (rt = la->la_rt) && (sdl = SDL(rt->rt_gateway))) {
if (sdl->sdl_alen && if (sdl->sdl_alen &&
bcmp((caddr_t)ea->arp_sha, LLADDR(sdl), sdl->sdl_alen)) bcmp((caddr_t)ea->arp_sha, LLADDR(sdl), sdl->sdl_alen))
log(LOG_INFO, "arp info overwritten for %s by %s\n", log(LOG_INFO, "arp info overwritten for %s by %6D\n",
inet_ntoa(isaddr), ether_sprintf(ea->arp_sha)); inet_ntoa(isaddr), ea->arp_sha, ":");
(void)memcpy(LLADDR(sdl), ea->arp_sha, sizeof(ea->arp_sha)); (void)memcpy(LLADDR(sdl), ea->arp_sha, sizeof(ea->arp_sha));
sdl->sdl_alen = sizeof(ea->arp_sha); sdl->sdl_alen = sizeof(ea->arp_sha);
if (rt->rt_expire) if (rt->rt_expire)

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE. * SUCH DAMAGE.
* *
* @(#)clnp_debug.c 8.1 (Berkeley) 6/10/93 * @(#)clnp_debug.c 8.1 (Berkeley) 6/10/93
* $Id: clnp_debug.c,v 1.2 1994/08/02 07:49:35 davidg Exp $ * $Id: clnp_debug.c,v 1.3 1995/05/30 08:10:14 rgrimes Exp $
*/ */
/*********************************************************** /***********************************************************
@ -60,7 +60,7 @@ SOFTWARE.
/* /*
* ARGO Project, Computer Sciences Dept., University of Wisconsin - Madison * ARGO Project, Computer Sciences Dept., University of Wisconsin - Madison
*/ */
/* $Header: /home/ncvs/src/sys/netiso/clnp_debug.c,v 1.2 1994/08/02 07:49:35 davidg Exp $ */ /* $Header: /home/ncvs/src/sys/netiso/clnp_debug.c,v 1.3 1995/05/30 08:10:14 rgrimes Exp $ */
/* $Source: /home/ncvs/src/sys/netiso/clnp_debug.c,v $ */ /* $Source: /home/ncvs/src/sys/netiso/clnp_debug.c,v $ */
#include <sys/param.h> #include <sys/param.h>
@ -133,7 +133,6 @@ main()
#endif /* TESTDEBUG */ #endif /* TESTDEBUG */
unsigned int clnp_debug; unsigned int clnp_debug;
static char letters[] = "0123456789abcdef";
/* /*
* Print buffer in hex, return addr of where we left off. * Print buffer in hex, return addr of where we left off.
@ -149,8 +148,8 @@ char *where; /* where to put data */
for (i=0; i<len; i++) { for (i=0; i<len; i++) {
register int j = ((u_char *)src)[i]; register int j = ((u_char *)src)[i];
*where++ = letters[j >> 4]; *where++ = hex2ascii[j >> 4];
*where++ = letters[j & 0x0f]; *where++ = hex2ascii[j & 0x0f];
} }
return where; return where;
} }

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE. * SUCH DAMAGE.
* *
* @(#)nfs_vnops.c 8.5 (Berkeley) 2/13/94 * @(#)nfs_vnops.c 8.5 (Berkeley) 2/13/94
* $Id: nfs_vnops.c,v 1.30 1995/11/21 15:51:39 bde Exp $ * $Id: nfs_vnops.c,v 1.31 1995/12/07 12:47:29 davidg Exp $
*/ */
/* /*
@ -2447,7 +2447,6 @@ nfsmout:
} }
return (error); return (error);
} }
static char hextoasc[] = "0123456789abcdef";
/* /*
* Silly rename. To make the NFS filesystem that is stateless look a little * Silly rename. To make the NFS filesystem that is stateless look a little
@ -2481,12 +2480,7 @@ nfs_sillyrename(dvp, vp, cnp)
/* Fudge together a funny name */ /* Fudge together a funny name */
pid = cnp->cn_proc->p_pid; pid = cnp->cn_proc->p_pid;
bcopy(".nfsAxxxx4.4", sp->s_name, 13); sp->s_namelen = sprintf(sp->s_name, ".nfsA%04x4.4", pid);
sp->s_namlen = 12;
sp->s_name[8] = hextoasc[pid & 0xf];
sp->s_name[7] = hextoasc[(pid >> 4) & 0xf];
sp->s_name[6] = hextoasc[(pid >> 8) & 0xf];
sp->s_name[5] = hextoasc[(pid >> 12) & 0xf];
/* Try lookitups until we get one that isn't there */ /* Try lookitups until we get one that isn't there */
while (nfs_lookitup(dvp, sp->s_name, sp->s_namlen, sp->s_cred, while (nfs_lookitup(dvp, sp->s_name, sp->s_namlen, sp->s_cred,

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE. * SUCH DAMAGE.
* *
* @(#)nfs_vnops.c 8.5 (Berkeley) 2/13/94 * @(#)nfs_vnops.c 8.5 (Berkeley) 2/13/94
* $Id: nfs_vnops.c,v 1.30 1995/11/21 15:51:39 bde Exp $ * $Id: nfs_vnops.c,v 1.31 1995/12/07 12:47:29 davidg Exp $
*/ */
/* /*
@ -2447,7 +2447,6 @@ nfsmout:
} }
return (error); return (error);
} }
static char hextoasc[] = "0123456789abcdef";
/* /*
* Silly rename. To make the NFS filesystem that is stateless look a little * Silly rename. To make the NFS filesystem that is stateless look a little
@ -2481,12 +2480,7 @@ nfs_sillyrename(dvp, vp, cnp)
/* Fudge together a funny name */ /* Fudge together a funny name */
pid = cnp->cn_proc->p_pid; pid = cnp->cn_proc->p_pid;
bcopy(".nfsAxxxx4.4", sp->s_name, 13); sp->s_namelen = sprintf(sp->s_name, ".nfsA%04x4.4", pid);
sp->s_namlen = 12;
sp->s_name[8] = hextoasc[pid & 0xf];
sp->s_name[7] = hextoasc[(pid >> 4) & 0xf];
sp->s_name[6] = hextoasc[(pid >> 8) & 0xf];
sp->s_name[5] = hextoasc[(pid >> 12) & 0xf];
/* Try lookitups until we get one that isn't there */ /* Try lookitups until we get one that isn't there */
while (nfs_lookitup(dvp, sp->s_name, sp->s_namlen, sp->s_cred, while (nfs_lookitup(dvp, sp->s_name, sp->s_namlen, sp->s_cred,

View File

@ -21,7 +21,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
* $Id: pdq.c,v 1.6 1995/10/29 15:33:31 phk Exp $ * $Id: pdq.c,v 1.7 1996/01/24 20:01:27 wollman Exp $
* *
* Revision 1.8 1995/03/14 01:52:52 thomas * Revision 1.8 1995/03/14 01:52:52 thomas
* Update for new FreeBSD PCI Interrupt interface * Update for new FreeBSD PCI Interrupt interface
@ -200,28 +200,14 @@ pdq_print_fddi_chars(
pdq_t *pdq, pdq_t *pdq,
const pdq_response_status_chars_get_t *rsp) const pdq_response_status_chars_get_t *rsp)
{ {
const char hexchars[] = "0123456789abcdef";
printf(PDQ_OS_PREFIX "DEC %s FDDI %s Controller\n", printf(PDQ_OS_PREFIX "DEC %s FDDI %s Controller\n",
PDQ_OS_PREFIX_ARGS, pdq_descriptions[pdq->pdq_type], PDQ_OS_PREFIX_ARGS, pdq_descriptions[pdq->pdq_type],
pdq_station_types[rsp->status_chars_get.station_type]); pdq_station_types[rsp->status_chars_get.station_type]);
printf(PDQ_OS_PREFIX "FDDI address %c%c:%c%c:%c%c:%c%c:%c%c:%c%c, FW=%c%c%c%c, HW=%c", printf(PDQ_OS_PREFIX "FDDI address %6D, FW=%4.4s, HW=%c",
PDQ_OS_PREFIX_ARGS, PDQ_OS_PREFIX_ARGS, pdq->pdq_hwaddr.lanaddr_bytes, ":",
hexchars[pdq->pdq_hwaddr.lanaddr_bytes[0] >> 4], pdq->pdq_fwrev.fwrev_bytes,
hexchars[pdq->pdq_hwaddr.lanaddr_bytes[0] & 0x0F],
hexchars[pdq->pdq_hwaddr.lanaddr_bytes[1] >> 4],
hexchars[pdq->pdq_hwaddr.lanaddr_bytes[1] & 0x0F],
hexchars[pdq->pdq_hwaddr.lanaddr_bytes[2] >> 4],
hexchars[pdq->pdq_hwaddr.lanaddr_bytes[2] & 0x0F],
hexchars[pdq->pdq_hwaddr.lanaddr_bytes[3] >> 4],
hexchars[pdq->pdq_hwaddr.lanaddr_bytes[3] & 0x0F],
hexchars[pdq->pdq_hwaddr.lanaddr_bytes[4] >> 4],
hexchars[pdq->pdq_hwaddr.lanaddr_bytes[4] & 0x0F],
hexchars[pdq->pdq_hwaddr.lanaddr_bytes[5] >> 4],
hexchars[pdq->pdq_hwaddr.lanaddr_bytes[5] & 0x0F],
pdq->pdq_fwrev.fwrev_bytes[0], pdq->pdq_fwrev.fwrev_bytes[1],
pdq->pdq_fwrev.fwrev_bytes[2], pdq->pdq_fwrev.fwrev_bytes[3],
rsp->status_chars_get.module_rev.fwrev_bytes[0]); rsp->status_chars_get.module_rev.fwrev_bytes[0]);
if (rsp->status_chars_get.smt_version_id < PDQ_ARRAY_SIZE(pdq_smt_versions)) { if (rsp->status_chars_get.smt_version_id < PDQ_ARRAY_SIZE(pdq_smt_versions)) {