Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 339476
b: refs/heads/master
c: bde9819
h: refs/heads/master
v: v3
  • Loading branch information
Joe Perches authored and Steve French committed Dec 5, 2012
1 parent 5b59ad8 commit b1e230c
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 24 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 52c0f4ad8ed462d81f1d37f56a74a71dc0c9bf0f
refs/heads/master: bde98197310fd085ee4bb00ab310abcbe55b0664
64 changes: 41 additions & 23 deletions trunk/fs/cifs/cifs_debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,53 +37,71 @@ void dump_smb(void *, int);
#define CIFS_RC 0x02
#define CIFS_TIMER 0x04

extern int cifsFYI;
extern int cifsERROR;

/*
* debug ON
* --------
*/
#ifdef CIFS_DEBUG

/* information message: e.g., configuration, major event */
extern int cifsFYI;
#define cifsfyi(fmt, arg...) \
#define cifsfyi(fmt, ...) \
do { \
if (cifsFYI & CIFS_INFO) \
printk(KERN_DEBUG "%s: " fmt "\n", __FILE__, ##arg); \
printk(KERN_DEBUG "%s: " fmt "\n", \
__FILE__, ##__VA_ARGS__); \
} while (0)

#define cFYI(set, fmt, arg...) \
do { \
if (set) \
cifsfyi(fmt, ##arg); \
#define cFYI(set, fmt, ...) \
do { \
if (set) \
cifsfyi(fmt, ##__VA_ARGS__); \
} while (0)

#define cifswarn(fmt, arg...) \
printk(KERN_WARNING fmt "\n", ##arg)

/* debug event message: */
extern int cifsERROR;
#define cifswarn(fmt, ...) \
printk(KERN_WARNING fmt "\n", ##__VA_ARGS__)

/* error event message: e.g., i/o error */
#define cifserror(fmt, arg...) \
do { \
if (cifsERROR) \
printk(KERN_ERR "CIFS VFS: " fmt "\n", ##arg); \
#define cifserror(fmt, ...) \
do { \
if (cifsERROR) \
printk(KERN_ERR "CIFS VFS: " fmt "\n", ##__VA_ARGS__); \
} while (0)

#define cERROR(set, fmt, arg...) \
do { \
if (set) \
cifserror(fmt, ##arg); \
#define cERROR(set, fmt, ...) \
do { \
if (set) \
cifserror(fmt, ##__VA_ARGS__); \
} while (0)

/*
* debug OFF
* ---------
*/
#else /* _CIFS_DEBUG */
#define cERROR(set, fmt, arg...)
#define cFYI(set, fmt, arg...)
#define cifserror(fmt, arg...)
#define cifsfyi(fmt, ...) \
do { \
if (0) \
printk(KERN_DEBUG "%s: " fmt "\n", \
__FILE__, ##__VA_ARGS__); \
} while (0)
#define cFYI(set, fmt, ...) \
do { \
if (0 && set) \
cifsfyi(fmt, ##__VA_ARGS__); \
} while (0)
#define cifserror(fmt, ...) \
do { \
if (0) \
printk(KERN_ERR "CIFS VFS: " fmt "\n", ##__VA_ARGS__); \
} while (0)
#define cERROR(set, fmt, ...) \
do { \
if (0 && set) \
cifserror(fmt, ##__VA_ARGS__); \
} while (0)
#endif /* _CIFS_DEBUG */

#endif /* _H_CIFS_DEBUG */

0 comments on commit b1e230c

Please sign in to comment.