diff options
Diffstat (limited to 'tools/btmgmt.c')
-rw-r--r-- | tools/btmgmt.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/btmgmt.c b/tools/btmgmt.c index fc8f0e37a..f82461ed7 100644 --- a/tools/btmgmt.c +++ b/tools/btmgmt.c @@ -4640,6 +4640,13 @@ static struct io *setup_stdin(void) return io; } +static void mgmt_debug(const char *str, void *user_data) +{ + const char *prefix = user_data; + + print("%s%s", prefix, str); +} + int main(int argc, char *argv[]) { struct io *input; @@ -4675,6 +4682,9 @@ int main(int argc, char *argv[]) return EXIT_FAILURE; } + if (getenv("MGMT_DEBUG")) + mgmt_set_debug(mgmt, mgmt_debug, "mgmt: ", NULL); + if (argc > 0) { struct cmd_info *c; |