1#ifndef _FS_CEPH_DEBUG_H
2#define _FS_CEPH_DEBUG_H
3
4#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
5
6#include <linux/string.h>
7
8#ifdef CONFIG_CEPH_LIB_PRETTYDEBUG
9
10
11
12
13
14
15
16# if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG)
17# define dout(fmt, ...) \
18 pr_debug("%.*s %12.12s:%-4d : " fmt, \
19 8 - (int)sizeof(KBUILD_MODNAME), " ", \
20 kbasename(__FILE__), __LINE__, ##__VA_ARGS__)
21# else
22
23# define dout(fmt, ...) do { \
24 if (0) \
25 printk(KERN_DEBUG fmt, ##__VA_ARGS__); \
26 } while (0)
27# endif
28
29#else
30
31
32
33
34# define dout(fmt, ...) pr_debug(" " fmt, ##__VA_ARGS__)
35
36#endif
37
38#endif
39