diff options
Diffstat (limited to 'fs/cifs/cifs_debug.h')
-rw-r--r-- | fs/cifs/cifs_debug.h | 72 |
1 files changed, 41 insertions, 31 deletions
diff --git a/fs/cifs/cifs_debug.h b/fs/cifs/cifs_debug.h index c0c68bb492d7..86e92ef2abc1 100644 --- a/fs/cifs/cifs_debug.h +++ b/fs/cifs/cifs_debug.h | |||
@@ -18,7 +18,6 @@ | |||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
19 | * | 19 | * |
20 | */ | 20 | */ |
21 | #define CIFS_DEBUG /* BB temporary */ | ||
22 | 21 | ||
23 | #ifndef _H_CIFS_DEBUG | 22 | #ifndef _H_CIFS_DEBUG |
24 | #define _H_CIFS_DEBUG | 23 | #define _H_CIFS_DEBUG |
@@ -37,49 +36,43 @@ void dump_smb(void *, int); | |||
37 | #define CIFS_RC 0x02 | 36 | #define CIFS_RC 0x02 |
38 | #define CIFS_TIMER 0x04 | 37 | #define CIFS_TIMER 0x04 |
39 | 38 | ||
39 | extern int cifsFYI; | ||
40 | extern int cifsERROR; | ||
41 | |||
40 | /* | 42 | /* |
41 | * debug ON | 43 | * debug ON |
42 | * -------- | 44 | * -------- |
43 | */ | 45 | */ |
44 | #ifdef CIFS_DEBUG | 46 | #ifdef CONFIG_CIFS_DEBUG |
45 | 47 | ||
46 | /* information message: e.g., configuration, major event */ | 48 | /* information message: e.g., configuration, major event */ |
47 | extern int cifsFYI; | 49 | #define cifsfyi(fmt, ...) \ |
48 | #define cifsfyi(fmt, arg...) \ | ||
49 | do { \ | 50 | do { \ |
50 | if (cifsFYI & CIFS_INFO) \ | 51 | if (cifsFYI & CIFS_INFO) \ |
51 | printk(KERN_DEBUG "%s: " fmt "\n", __FILE__, ##arg); \ | 52 | printk(KERN_DEBUG "%s: " fmt "\n", \ |
53 | __FILE__, ##__VA_ARGS__); \ | ||
52 | } while (0) | 54 | } while (0) |
53 | 55 | ||
54 | #define cFYI(set, fmt, arg...) \ | 56 | #define cFYI(set, fmt, ...) \ |
55 | do { \ | 57 | do { \ |
56 | if (set) \ | 58 | if (set) \ |
57 | cifsfyi(fmt, ##arg); \ | 59 | cifsfyi(fmt, ##__VA_ARGS__); \ |
58 | } while (0) | 60 | } while (0) |
59 | 61 | ||
60 | #define cifswarn(fmt, arg...) \ | 62 | #define cifswarn(fmt, ...) \ |
61 | printk(KERN_WARNING fmt "\n", ##arg) | 63 | printk(KERN_WARNING fmt "\n", ##__VA_ARGS__) |
62 | 64 | ||
63 | /* debug event message: */ | 65 | /* error event message: e.g., i/o error */ |
64 | extern int cifsERROR; | 66 | #define cifserror(fmt, ...) \ |
65 | |||
66 | #define cEVENT(fmt, arg...) \ | ||
67 | do { \ | 67 | do { \ |
68 | if (cifsERROR) \ | 68 | if (cifsERROR) \ |
69 | printk(KERN_EVENT "%s: " fmt "\n", __FILE__, ##arg); \ | 69 | printk(KERN_ERR "CIFS VFS: " fmt "\n", ##__VA_ARGS__); \ |
70 | } while (0) | ||
71 | |||
72 | /* error event message: e.g., i/o error */ | ||
73 | #define cifserror(fmt, arg...) \ | ||
74 | do { \ | ||
75 | if (cifsERROR) \ | ||
76 | printk(KERN_ERR "CIFS VFS: " fmt "\n", ##arg); \ | ||
77 | } while (0) | 70 | } while (0) |
78 | 71 | ||
79 | #define cERROR(set, fmt, arg...) \ | 72 | #define cERROR(set, fmt, ...) \ |
80 | do { \ | 73 | do { \ |
81 | if (set) \ | 74 | if (set) \ |
82 | cifserror(fmt, ##arg); \ | 75 | cifserror(fmt, ##__VA_ARGS__); \ |
83 | } while (0) | 76 | } while (0) |
84 | 77 | ||
85 | /* | 78 | /* |
@@ -87,10 +80,27 @@ do { \ | |||
87 | * --------- | 80 | * --------- |
88 | */ | 81 | */ |
89 | #else /* _CIFS_DEBUG */ | 82 | #else /* _CIFS_DEBUG */ |
90 | #define cERROR(set, fmt, arg...) | 83 | #define cifsfyi(fmt, ...) \ |
91 | #define cEVENT(fmt, arg...) | 84 | do { \ |
92 | #define cFYI(set, fmt, arg...) | 85 | if (0) \ |
93 | #define cifserror(fmt, arg...) | 86 | printk(KERN_DEBUG "%s: " fmt "\n", \ |
87 | __FILE__, ##__VA_ARGS__); \ | ||
88 | } while (0) | ||
89 | #define cFYI(set, fmt, ...) \ | ||
90 | do { \ | ||
91 | if (0 && set) \ | ||
92 | cifsfyi(fmt, ##__VA_ARGS__); \ | ||
93 | } while (0) | ||
94 | #define cifserror(fmt, ...) \ | ||
95 | do { \ | ||
96 | if (0) \ | ||
97 | printk(KERN_ERR "CIFS VFS: " fmt "\n", ##__VA_ARGS__); \ | ||
98 | } while (0) | ||
99 | #define cERROR(set, fmt, ...) \ | ||
100 | do { \ | ||
101 | if (0 && set) \ | ||
102 | cifserror(fmt, ##__VA_ARGS__); \ | ||
103 | } while (0) | ||
94 | #endif /* _CIFS_DEBUG */ | 104 | #endif /* _CIFS_DEBUG */ |
95 | 105 | ||
96 | #endif /* _H_CIFS_DEBUG */ | 106 | #endif /* _H_CIFS_DEBUG */ |