All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ] tools/btmgmt: Fix --index option for non-interactive mode
@ 2024-07-09 11:55 Arjan Opmeer
  2024-07-09 13:53 ` [BlueZ] " bluez.test.bot
  2024-07-09 14:50 ` [PATCH BlueZ] " patchwork-bot+bluetooth
  0 siblings, 2 replies; 3+ messages in thread
From: Arjan Opmeer @ 2024-07-09 11:55 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Arjan Opmeer

In non-interactive mode the --index option does not work because the
call to mgmt_set_index() is made after bt_shell_attach().
See also https://github.com/bluez/bluez/issues/893

---
 tools/btmgmt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/btmgmt.c b/tools/btmgmt.c
index 9b7f851bd..436c2bb21 100644
--- a/tools/btmgmt.c
+++ b/tools/btmgmt.c
@@ -51,8 +51,8 @@ int main(int argc, char *argv[])
 		return EXIT_FAILURE;
 	}
 
-	bt_shell_attach(fileno(stdin));
 	mgmt_set_index(index_option);
+	bt_shell_attach(fileno(stdin));
 	status = bt_shell_run();
 
 	mgmt_remove_submenu();
-- 
2.45.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-07-09 14:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-09 11:55 [PATCH BlueZ] tools/btmgmt: Fix --index option for non-interactive mode Arjan Opmeer
2024-07-09 13:53 ` [BlueZ] " bluez.test.bot
2024-07-09 14:50 ` [PATCH BlueZ] " patchwork-bot+bluetooth

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.