All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ 1/2] shell: Make bt_shell_add_submenu set main menu if none has been set
@ 2022-03-28 21:25 Luiz Augusto von Dentz
  2022-03-28 21:25 ` [PATCH BlueZ 2/2] client: Add support for player submenu Luiz Augusto von Dentz
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Luiz Augusto von Dentz @ 2022-03-28 21:25 UTC (permalink / raw)
  To: linux-bluetooth

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

If not main menu has been set when calling bt_shell_add_submenu then
turns it on it main menu.
---
 src/shared/shell.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/shared/shell.c b/src/shared/shell.c
index 0d82bc282..7ba264b99 100644
--- a/src/shared/shell.c
+++ b/src/shared/shell.c
@@ -1248,6 +1248,9 @@ bool bt_shell_add_submenu(const struct bt_shell_menu *menu)
 	if (!menu)
 		return false;
 
+	if (!data.main)
+		return bt_shell_set_menu(menu);
+
 	if (!data.submenus)
 		data.submenus = queue_new();
 
-- 
2.35.1


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

end of thread, other threads:[~2022-03-30 20:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-28 21:25 [PATCH BlueZ 1/2] shell: Make bt_shell_add_submenu set main menu if none has been set Luiz Augusto von Dentz
2022-03-28 21:25 ` [PATCH BlueZ 2/2] client: Add support for player submenu Luiz Augusto von Dentz
2022-03-28 23:58 ` [BlueZ,1/2] shell: Make bt_shell_add_submenu set main menu if none has been set bluez.test.bot
2022-03-30 20:00 ` [PATCH BlueZ 1/2] " 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.