Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/nick-nhusb]: src/sys/dev/usb Add USBHIST_LOGM which uses masks to contro...



details:   https://anonhg.NetBSD.org/src/rev/f13e5a079ed2
branches:  nick-nhusb
changeset: 334143:f13e5a079ed2
user:      skrll <skrll%NetBSD.org@localhost>
date:      Mon Mar 09 13:55:49 2015 +0000

description:
Add USBHIST_LOGM which uses masks to control logging

diffstat:

 sys/dev/usb/usbhist.h |  7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diffs (21 lines):

diff -r 565d2ecc9441 -r f13e5a079ed2 sys/dev/usb/usbhist.h
--- a/sys/dev/usb/usbhist.h     Mon Mar 09 09:21:54 2015 +0000
+++ b/sys/dev/usb/usbhist.h     Mon Mar 09 13:55:49 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: usbhist.h,v 1.1 2014/09/12 16:40:38 skrll Exp $        */
+/*     $NetBSD: usbhist.h,v 1.1.2.1 2015/03/09 13:55:49 skrll Exp $    */
 
 /*
  * Copyright (c) 2012 Matthew R. Green
@@ -57,6 +57,11 @@
                KERNHIST_LOG(usbhist,FMT,A,B,C,D);              \
        }                                                       \
 } while (0)
+#define USBHIST_LOGM(NAME,N,FMT,A,B,C,D)       do {            \
+       if ((NAME) & (N)) {                                     \
+               KERNHIST_LOG(usbhist,FMT,A,B,C,D);              \
+       }                                                       \
+} while (0)
 #define USBHIST_LOG(NAME,FMT,A,B,C,D)  USBHIST_LOGN(NAME,1,FMT,A,B,C,D)
 #define USBHIST_CALLED(NAME)                   do {            \
        if ((NAME) != 0) {                                      \



Home | Main Index | Thread Index | Old Index