public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ v1] shared/shell: Fix not calling pre_run for main menu
@ 2025-07-03 17:32 Luiz Augusto von Dentz
  2025-07-03 19:03 ` [BlueZ,v1] " bluez.test.bot
  2025-07-03 19:10 ` [PATCH BlueZ v1] " patchwork-bot+bluetooth
  0 siblings, 2 replies; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2025-07-03 17:32 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

When calling bt_shell_run the main menu pre_run was not being called
which cause tools with just one menu to not work as intended.

Fixes: https://github.com/bluez/bluez/issues/1319
---
 src/shared/shell.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/shared/shell.c b/src/shared/shell.c
index 6b4f7a7ef503..ec9e5f7dc984 100644
--- a/src/shared/shell.c
+++ b/src/shared/shell.c
@@ -1449,6 +1449,9 @@ int bt_shell_run(void)
 	int status;
 	const struct queue_entry *submenu;
 
+	if (data.menu && data.menu->pre_run)
+		data.menu->pre_run(data.menu);
+
 	for (submenu = queue_get_entries(data.submenus); submenu;
 	     submenu = submenu->next) {
 		struct bt_shell_menu *menu = submenu->data;
-- 
2.49.0


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

end of thread, other threads:[~2025-07-03 19:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-03 17:32 [PATCH BlueZ v1] shared/shell: Fix not calling pre_run for main menu Luiz Augusto von Dentz
2025-07-03 19:03 ` [BlueZ,v1] " bluez.test.bot
2025-07-03 19:10 ` [PATCH BlueZ v1] " patchwork-bot+bluetooth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox