aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/debug.h8
-rw-r--r--src/if.c2
-rw-r--r--src/slirp.c1
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)) { \
diff --git a/src/if.c b/src/if.c
index 23190b5..83dcae3 100644
--- a/src/if.c
+++ b/src/if.c
@@ -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 98cfd48..f25b41f 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));
}