shared/shell: Add submenu description
Luiz Augusto von Dentz
maintainerPATCH v2 1/3 shared/shell: Add submenu description
From: Luiz Augusto von Dentz <[email protected]>
This adds a field for submenu description.
--- src/shared/shell.c | 3 ++- src/shared/shell.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-)
src/shared/shell.c +2 -1
@@ -208,7 +208,8 @@ static void shell_print_menu(void) submenu = submenu->next) {struct bt_shell_menu *menu = submenu->data; -print_submenu (menu->name,"Submenu" ); +print_submenu (menu->name, menu->desc ? menu->desc : +"Submenu" ); } }
src/shared/shell.h +1 -0
@@ -52,6 +52,7 @@ struct bt_shell_menu_entry {struct bt_shell_menu {const char *name; +const char *desc;const struct bt_shell_menu_entry entries[]; };
Signature · 1 line
2.13.6
Luiz Augusto von Dentz
maintainerPATCH v2 2/3 client: Add description for submenus
From: Luiz Augusto von Dentz <[email protected]>
This adds proper descriptions for each submenu.
--- client/main.c | 3 +++ 1 file changed, 3 insertions(+)
client/main.c +3 -0
@@ -2202,6 +2202,7 @@ static void cmd_set_advertise_timeout(int argc, char *argv[])static const struct bt_shell_menu advertise_menu = { .name ="advertise" , + .desc ="Advertising Management Submenu" , .entries = { {"set-uuids" ,"[uuid1 uuid2 ...]" , cmd_set_advertise_uuids,"Set advertise uuids" },
@@ -2226,6 +2227,7 @@ static const struct bt_shell_menu advertise_menu = {static const struct bt_shell_menu scan_menu = { .name ="scan" , + .desc ="Scan Filters Submenu" , .entries = { {"set-filter-uuids" ,"[uuid1 uuid2 ...]" , cmd_set_scan_filter_uuids,"Set scan filter uuids" },
@@ -2246,6 +2248,7 @@ static const struct bt_shell_menu scan_menu = {static const struct bt_shell_menu gatt_menu = { .name ="gatt" , + .desc ="Generic Attribute Submenu" , .entries = { {"list-attributes" ,"[dev]" , cmd_list_attributes,"List attributes" , dev_generator },
Signature · 1 line
2.13.6
Luiz Augusto von Dentz
maintainerPATCH v2 3/3 mesh: Add description for submenus
In reply to Luiz Augusto von DentzFrom: Luiz Augusto von Dentz <[email protected]>
This adds proper descriptions for each submenu.
--- mesh/config-client.c | 1 + mesh/onoff-model.c | 1 + 2 files changed, 2 insertions(+)
mesh/config-client.c +1 -0
@@ -613,6 +613,7 @@ static void cmd_get_ttl(int argc, char *argv[])static const struct bt_shell_menu cfg_menu = { .name ="config" , + .desc ="Configuration Model Submenu" , .entries = { {"target" ,"<unicast>" , cmd_set_node,"Set target node to configure" },
mesh/onoff-model.c +1 -0
@@ -259,6 +259,7 @@ static void cmd_set(int argc, char *argv[])static const struct bt_shell_menu onoff_menu = { .name ="onoff" , + .desc ="On/Off Model Submenu" , .entries = { {"target" ,"<unicast>" , cmd_set_node,"Set node to configure" },
Signature · 1 line
2.13.6
Hi,
Quoted 35 lines · Luiz Augusto von Dentz
From: Luiz Augusto von Dentz <[email protected]>
This adds a field for submenu description.
--- src/shared/shell.c | 3 ++- src/shared/shell.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-)src/shared/shell.c +2
-1@@ -208,7 +208,8 @@ static void shell_print_menu(void) submenu = submenu->next) {struct bt_shell_menu *menu = submenu->data; -print_submenu (menu->name,"Submenu" ); +print_submenu (menu->name, menu->desc ? menu->desc : +"Submenu" ); } }src/shared/shell.h +1
-1@@ -52,6 +52,7 @@ struct bt_shell_menu_entry {struct bt_shell_menu {const char *name; +const char *desc;const struct bt_shell_menu_entry entries[]; }; --
Quoted 1 line
2.13.6
Applied.
Signature · 1 line
Luiz Augusto von Dentz