]> Git Repo - qemu.git/blob - slirp/debug.h
sd: express dependencies with kconfig
[qemu.git] / slirp / debug.h
1 /*
2  * Copyright (c) 1995 Danny Gasparovski.
3  *
4  * Please read the file COPYRIGHT for the
5  * terms and conditions of the copyright.
6  */
7
8 #ifndef DEBUG_H_
9 #define DEBUG_H_
10
11 #define DBG_CALL (1 << 0)
12 #define DBG_MISC (1 << 1)
13 #define DBG_ERROR (1 << 2)
14 #define DBG_TFTP (1 << 3)
15
16 extern int slirp_debug;
17
18 #define DEBUG_CALL(fmt, ...) do {               \
19     if (G_UNLIKELY(slirp_debug & DBG_CALL)) {   \
20         g_debug(fmt "...", ##__VA_ARGS__);      \
21     }                                           \
22 } while (0)
23
24 #define DEBUG_ARG(fmt, ...) do {                \
25     if (G_UNLIKELY(slirp_debug & DBG_CALL)) {   \
26         g_debug(" " fmt, ##__VA_ARGS__);        \
27     }                                           \
28 } while (0)
29
30 #define DEBUG_MISC(fmt, ...) do {               \
31     if (G_UNLIKELY(slirp_debug & DBG_MISC)) {   \
32         g_debug(fmt, ##__VA_ARGS__);            \
33     }                                           \
34 } while (0)
35
36 #define DEBUG_ERROR(fmt, ...) do {              \
37     if (G_UNLIKELY(slirp_debug & DBG_ERROR)) {  \
38         g_debug(fmt, ##__VA_ARGS__);            \
39     }                                           \
40 } while (0)
41
42 #define DEBUG_TFTP(fmt, ...) do {               \
43     if (G_UNLIKELY(slirp_debug & DBG_TFTP)) {   \
44         g_debug(fmt, ##__VA_ARGS__);            \
45     }                                           \
46 } while (0)
47
48 #endif /* DEBUG_H_ */
This page took 0.026349 seconds and 4 git commands to generate.