client: Add support for mgmt submenu
Subsystems (2)
Luiz Augusto von Dentz
maintainerPATCH 1/1 client: Add support for mgmt submenu
From: Luiz Augusto von Dentz <[email protected]>
This moves the functionality of btmgmt into client/mgmt.c so its commands become available on bluetoothctl via mgmt submenu.
--- Makefile.tools | 11 +- client/main.c | 3 + tools/btmgmt.c => client/mgmt.c | 173 +- client/mgmt.h | 13 + tools/btmgmt.c | 6040 +------------------------------ 5 files changed, 89 insertions(+), 6151 deletions(-) copy tools/btmgmt.c => client/mgmt.c (98%) create mode 100644 client/mgmt.h
Makefile.tools +7 -4
@@ -12,9 +12,11 @@ client_bluetoothctl_SOURCES = client/main.c \ client/adv_monitor.c \ client/gatt.h client/gatt.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 + client/player.h client/player.c \ + client/mgmt.h client/mgmt.c +client_bluetoothctl_LDADD = lib/libbluetooth-internal.la \ + gdbus/libgdbus-internal.la src/libshared-glib.la \ + $(GLIB_LIBS) $(DBUS_LIBS) -lreadline endif if ZSH_COMPLETIONS
@@ -505,7 +507,8 @@ tools_obexctl_SOURCES = tools/obexctl.c tools_obexctl_LDADD = gdbus/libgdbus-internal.la src/libshared-glib.la \ $(GLIB_LIBS) $(DBUS_LIBS) -lreadline -tools_btmgmt_SOURCES = tools/btmgmt.c src/uuid-helper.c client/display.c +tools_btmgmt_SOURCES = tools/btmgmt.c src/uuid-helper.c client/display.c \ + client/mgmt.c tools_btmgmt_LDADD = lib/libbluetooth-internal.la src/libshared-mainloop.la \ -lreadline if DEPRECATED
client/main.c +3 -0
@@ -33,6 +33,7 @@#include "adv_monitor.h" #include "admin.h" #include "player.h" +#include "mgmt.h" /* String display constants */ #define COLORED_NEW COLOR_GREEN "NEW" COLOR_OFF
@@ -3190,6 +3191,7 @@ int main(int argc, char *argv[])admin_add_submenu ();player_add_submenu (); +mgmt_add_submenu (); client =g_dbus_client_new (dbus_conn,"org.bluez" ,"/org/bluez" );
@@ -3206,6 +3208,7 @@ int main(int argc, char *argv[])admin_remove_submenu ();player_remove_submenu (); +mgmt_remove_submenu ();g_dbus_client_unref (client);
client/mgmt.c renamed from tools/btmgmt.c +61 -112
354 lines not on this page · raw message
client/mgmt.h new file +13 -0
@@ -0,0 +1,13 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* +* +* BlueZ - Bluetooth protocol stack for Linux +* +* Copyright (C) 2023 Intel Corporation. All rights reserved. +* +* +*/ + +bool mgmt_add_submenu (void ); +void mgmt_remove_submenu (void ); +void mgmt_set_index (const char *arg);
tools/btmgmt.c +5 -6035
2,589 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.40.1
Part of the diff is not shown here. View the raw message.
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=766075
---Test result---
Test Summary:
CheckPatch PASS 0.78 seconds GitLint PASS 0.34 seconds BuildEll PASS 27.25 seconds BluezMake PASS 871.73 seconds MakeCheck PASS 11.91 seconds MakeDistcheck PASS 155.47 seconds CheckValgrind PASS 256.31 seconds CheckSmatch PASS 342.12 seconds bluezmakeextell PASS 103.53 seconds IncrementalBuild PASS 705.07 seconds ScanBuild PASS 1062.96 seconds
---
Regards,
Linux Bluetooth