diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/debug.h | 8 | ||||
-rw-r--r-- | src/if.c | 2 | ||||
-rw-r--r-- | src/slirp.c | 1 |
3 files changed, 10 insertions, 1 deletions
diff --git a/src/debug.h b/src/debug.h index 47712bd..0f9f3ef 100644 --- a/src/debug.h +++ b/src/debug.h @@ -10,6 +10,7 @@ #define DBG_MISC (1 << 1) #define DBG_ERROR (1 << 2) #define DBG_TFTP (1 << 3) +#define DBG_VERBOSE_CALL (1 << 4) extern int slirp_debug; @@ -20,6 +21,13 @@ extern int slirp_debug; } \ } while (0) +#define DEBUG_VERBOSE_CALL(fmt, ...) \ + do { \ + if (G_UNLIKELY(slirp_debug & DBG_VERBOSE_CALL)) { \ + g_debug(fmt "...", ##__VA_ARGS__); \ + } \ + } while (0) + #define DEBUG_ARG(fmt, ...) \ do { \ if (G_UNLIKELY(slirp_debug & DBG_CALL)) { \ @@ -143,7 +143,7 @@ void if_start(Slirp *slirp) bool from_batchq = false; struct mbuf *ifm, *ifm_next, *ifqt; - DEBUG_CALL("if_start"); + DEBUG_VERBOSE_CALL("if_start"); if (slirp->if_start_busy) { return; diff --git a/src/slirp.c b/src/slirp.c index 110e6fc..60f8802 100644 --- a/src/slirp.c +++ b/src/slirp.c @@ -362,6 +362,7 @@ static void slirp_init_once(void) { "misc", DBG_MISC }, { "error", DBG_ERROR }, { "tftp", DBG_TFTP }, + { "verbose_call", DBG_VERBOSE_CALL }, }; slirp_debug = g_parse_debug_string(debug, keys, G_N_ELEMENTS(keys)); } |