Module Name:    src
Committed By:   skrll
Date:           Mon Mar  9 13:55:49 UTC 2015

Modified Files:
        src/sys/dev/usb [nick-nhusb]: usbhist.h

Log Message:
Add USBHIST_LOGM which uses masks to control logging


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.1.2.1 src/sys/dev/usb/usbhist.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/usb/usbhist.h
diff -u src/sys/dev/usb/usbhist.h:1.1 src/sys/dev/usb/usbhist.h:1.1.2.1
--- src/sys/dev/usb/usbhist.h:1.1	Fri Sep 12 16:40:38 2014
+++ src/sys/dev/usb/usbhist.h	Mon Mar  9 13:55:49 2015
@@ -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 @@ extern int usbdebug;
 		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) {					\

Reply via email to