public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: Bastien Nocera <hadess@hadess.net>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH BlueZ 1/1] tools/btmgmt: Fix btmgmt --help hanging
Date: Wed, 11 Mar 2026 12:14:13 +0100	[thread overview]
Message-ID: <20260311111540.2170373-2-hadess@hadess.net> (raw)
In-Reply-To: <20260311111540.2170373-1-hadess@hadess.net>

btmgmt when run interactively would wait for commands on its prompt, but
that prompt is never setup when the help output is requested.

Handle --help through bt_shell_handle_non_interactive_help() so that the
application exits as soon as the help content has been printed, like
other interactive apps in bluez.
---
 tools/btmgmt.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tools/btmgmt.c b/tools/btmgmt.c
index 0f3de2880014..762a3a141c4a 100644
--- a/tools/btmgmt.c
+++ b/tools/btmgmt.c
@@ -47,6 +47,9 @@ int main(int argc, char *argv[])
 	bt_shell_init(argc, argv, &opt);
 
 	mgmt_add_submenu();
+
+	bt_shell_handle_non_interactive_help();
+
 	mgmt_set_index(index_option);
 	bt_shell_attach(fileno(stdin));
 	status = bt_shell_run();
-- 
2.53.0


  reply	other threads:[~2026-03-11 11:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-11 11:14 [PATCH BlueZ 0/1] tools/btmgmt: Fix btmgmt --help hanging Bastien Nocera
2026-03-11 11:14 ` Bastien Nocera [this message]
2026-03-11 12:34   ` bluez.test.bot
2026-03-17 19:50 ` [PATCH BlueZ 0/1] " patchwork-bot+bluetooth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260311111540.2170373-2-hadess@hadess.net \
    --to=hadess@hadess.net \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox