-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvmdebug.h
24 lines (21 loc) · 808 Bytes
/
vmdebug.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
//Macros and definitions for debugging with virtual mouse
//Author: Edwin Heerschap
#ifndef VM_DEBUG_H
#define VM_DEBUG_H
//Compile with VM_DEBUG_ENABLE flag to enable debugging lines in console.
//OR (if you are lazy like me you can uncomment the line below)
//#define VM_DEBUG_ENABLE
#ifdef VM_DEBUG_ENABLE
#define VM_DBGPFX "Virtual Mouse Debug: "
#define VM_DEBUG(x) printk(KERN_ALERT VM_DBGPFX x);
#define VM_DEBUGVARS(x,v...) printk(KERN_ALERT VM_DBGPFX x, v);
#define VM_DEBUGIF(cond, x) if (cond) printk(KERN_ALERT VM_DBGPFX x);
#define VM_DEBUGIFVARS(cond, x, v...) if (cond) printk(KERN_ALERT VM_DBGPFX x, v)
#else
#define VM_DEBUG(x)
#define VM_DEBUGVARS(x,v...)
#define VM_DBGPFX
#define VM_DEBUGIF(cond, x) cond
#define VM_DEBUGIFVARS(cond, x, v....) cond
#endif
#endif