From: patrick Date: Wed, 24 Jan 2018 13:07:31 +0000 (+0000) Subject: Put the default case, which prints information about an event we do not yet X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=cd99bb20ee4f77bdb52a07c37c8d4efe776b81df;p=openbsd Put the default case, which prints information about an event we do not yet handle, into a debug printf. Also do not print a pointer to kernel buffers so that we don't leak kernel addresses. Spotted by and ok stsp@ --- diff --git a/sys/dev/ic/bwfm.c b/sys/dev/ic/bwfm.c index b502982fa4f..3ba2ee2c4fb 100644 --- a/sys/dev/ic/bwfm.c +++ b/sys/dev/ic/bwfm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bwfm.c,v 1.31 2018/01/24 13:04:22 patrick Exp $ */ +/* $OpenBSD: bwfm.c,v 1.32 2018/01/24 13:07:31 patrick Exp $ */ /* * Copyright (c) 2010-2016 Broadcom Corporation * Copyright (c) 2016,2017 Patrick Wildt @@ -1922,10 +1922,10 @@ bwfm_rx_event(struct bwfm_softc *sc, char *buf, size_t len) break; #endif default: - printf("%s: buf %p len %lu datalen %u code %u status %u" - " reason %u\n", __func__, buf, len, ntohl(e->msg.datalen), + DPRINTF(("%s: len %lu datalen %u code %u status %u" + " reason %u\n", __func__, len, ntohl(e->msg.datalen), ntohl(e->msg.event_type), ntohl(e->msg.status), - ntohl(e->msg.reason)); + ntohl(e->msg.reason))); break; } }