shell: Make bt_shell_add_submenu set main menu if none has been set
Subsystems (2)
Luiz Augusto von Dentz
maintainerPATCH 1/2 shell: Make bt_shell_add_submenu set main menu if none has been set
From: Luiz Augusto von Dentz <[email protected]>
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(+)
src/shared/shell.c +3 -0
@@ -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 ();
Signature · 1 line
2.35.1
Luiz Augusto von Dentz
maintainerPATCH 2/2 client: Add support for player submenu
From: Luiz Augusto von Dentz <[email protected]>
This moves adds the functionality of bluetooth-player into bluetoothctl.
--- Makefile.tools | 6 +- client/main.c | 5 + tools/bluetooth-player.c => client/player.c | 70 +- client/player.h | 12 + tools/bluetooth-player.c | 1081 +------------------ 5 files changed, 64 insertions(+), 1110 deletions(-) copy tools/bluetooth-player.c => client/player.c (96%) create mode 100644 client/player.h
Makefile.tools +3 -3
@@ -10,8 +10,8 @@ client_bluetoothctl_SOURCES = client/main.c \ client/adv_monitor.h \ client/adv_monitor.c \ client/gatt.h client/gatt.c \ - client/admin.h \ - client/admin.c + client/admin.h client/admin.c \ + client/player.h client/player.c client_bluetoothctl_LDADD = gdbus/libgdbus-internal.la src/libshared-glib.la \ $(GLIB_LIBS) $(DBUS_LIBS) -lreadline endif
@@ -456,7 +456,7 @@ tools_obex_server_tool_SOURCES = $(gobex_sources) $(btio_sources) \ tools_obex_server_tool_LDADD = lib/libbluetooth-internal.la \ src/libshared-glib.la $(GLIB_LIBS) -tools_bluetooth_player_SOURCES = tools/bluetooth-player.c +tools_bluetooth_player_SOURCES = tools/bluetooth-player.c client/player.c tools_bluetooth_player_LDADD = gdbus/libgdbus-internal.la \ src/libshared-glib.la \ $(GLIB_LIBS) $(DBUS_LIBS) -lreadline
client/main.c +5 -0
@@ -30,6 +30,7 @@#include "advertising.h" #include "adv_monitor.h" #include "admin.h" +#include "player.h" /* String display constants */ #define COLORED_NEW COLOR_GREEN "NEW" COLOR_OFF
@@ -3215,6 +3216,8 @@ int main(int argc, char *argv[])bt_shell_set_env ("DBUS_CONNECTION" , dbus_conn); +player_add_submenu (); + client =g_dbus_client_new (dbus_conn,"org.bluez" ,"/org/bluez" );g_dbus_client_set_connect_watch (client, connect_handler,NULL );
@@ -3228,6 +3231,8 @@ int main(int argc, char *argv[]) status =bt_shell_run (); +player_remove_submenu (); +g_dbus_client_unref (client);dbus_connection_unref (dbus_conn);
client/player.c renamed from tools/bluetooth-player.c +29 -41
142 lines not on this page · raw message
client/player.h new file +12 -0
@@ -0,0 +1,12 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* +* +* BlueZ - Bluetooth protocol stack for Linux +* +* Copyright (C) 2020 Intel Corporation. All rights reserved. +* +* +*/ + +void player_add_submenu (void ); +void player_remove_submenu (void );
tools/bluetooth-player.c +15 -1066
1,124 lines not on this page · raw message
Signature · 1 line
2.35.1
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=627009
---Test result---
Test Summary:
CheckPatch FAIL 1.64 seconds GitLint PASS 0.99 seconds Prep - Setup ELL PASS 53.47 seconds Build - Prep PASS 0.70 seconds Build - Configure PASS 10.70 seconds Build - Make PASS 1802.68 seconds Make Check PASS 13.23 seconds Make Check w/Valgrind PASS 545.21 seconds Make Distcheck PASS 282.63 seconds Build w/ext ELL - Configure PASS 10.07 seconds Build w/ext ELL - Make PASS 1754.57 seconds Incremental Build with patchesPASS 3577.10 seconds
Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script with rule in .checkpatch.conf Output:
[BlueZ,2/2] client: Add support for player submenu ERROR:SPACING: need consistent spacing around '*' (ctx:WxV) #272: FILE: client/player.c:1102:
+static GDBusClient *client;
^/github/workspace/src/12794262.patch total: 1 errors, 0 warnings, 1319 lines checked
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.
/github/workspace/src/12794262.patch has style problems, please review.
NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
---
Regards,
Linux Bluetooth
This series was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:
Hello:
This series was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:
Quoted 7 lines · On Mon, 28 Mar 2022 14:25:17 -0700 you wrote:
From: Luiz Augusto von Dentz <[email protected]>
If not main menu has been set when calling
bt_shell_add_submenuthen turns it on it main menu.--- src/shared/shell.c | 3 +++ 1 file changed, 3 insertions(+)
Here is the summary with links:
- [BlueZ,1/2] shell: Make bt_shell_add_submenu set main menu if none has been set
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=0cc480a546e9
- [BlueZ,2/2] client: Add support for player submenu (no matching commit)
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html