tools/btpclient: Move btpclient to client/btpclient directory
Subsystems (2)
PATCH v2 1/3 tools/btpclient: Move btpclient to client/btpclient directory
This prepares the split of btp services in per profile files for easier maintenance.
---
.gitignore | 4 ++--
Makefile.tools | 13 +++++++------
{tools => client/btpclient}/btpclient.c | 0
{tools => client/btpclient}/btpclientctl.c | 0
4 files changed, 9 insertions(+), 8 deletions(-)
rename {tools => client/btpclient}/btpclient.c (100%)
rename {tools => client/btpclient}/btpclientctl.c (100%).gitignore +2 -2
@@ -133,8 +133,8 @@ tools/btattach tools/btconfig tools/btmgmt tools/btsnoop -tools/btpclient -tools/btpclientctl +client/btpclient/btpclient +client/btpclient/btpclientctl tools/btmon-logger tools/bluetooth-logger.service tools/mpris-proxy.service
Makefile.tools +7 -6
@@ -583,14 +583,15 @@ test_scripts += test/bluezutils.py \ test/test-gatt-profile test/test-mesh test/agent.py if BTPCLIENT -noinst_PROGRAMS += tools/btpclient tools/btpclientctl +noinst_PROGRAMS += client/btpclient/btpclient client/btpclient/btpclientctl -tools_btpclient_SOURCES = tools/btpclient.c src/shared/btp.c src/shared/btp.h -tools_btpclient_LDADD = lib/libbluetooth-internal.la \ +client_btpclient_btpclient_SOURCES = client/btpclient/btpclient.c \ + src/shared/btp.c src/shared/btp.h +client_btpclient_btpclient_LDADD = lib/libbluetooth-internal.la \ src/libshared-ell.la $(ell_ldadd) -tools/btpclient.$(OBJEXT): src/libshared-ell.la ell/internal +client/btpclient/btpclient.$(OBJEXT): src/libshared-ell.la ell/internal -tools_btpclientctl_SOURCES = tools/btpclientctl.c client/display.c -tools_btpclientctl_LDADD = src/libshared-mainloop.la src/libshared-glib.la \ +client_btpclient_btpclientctl_SOURCES = client/btpclient/btpclientctl.c client/display.c +client_btpclient_btpclientctl_LDADD = src/libshared-mainloop.la src/libshared-glib.la \ lib/libbluetooth-internal.la -lreadline endif
client/btpclient/btpclient.c renamed from tools/btpclient.c +0 -0
client/btpclient/btpclientctl.c renamed from tools/btpclientctl.c +0 -0
Signature · 1 line
2.43.0
PATCH v2 2/3 client/btpclient: Move btp core service in its own file
Moving the btp services in their own files will simplify maintenance.
---v1->v2: Fix make distcheck
Makefile.tools | 4 +- client/btpclient/btpclient.c | 139 ++++---------------------------- client/btpclient/btpclient.h | 12 +++ client/btpclient/core.c | 150 +++++++++++++++++++++++++++++++++++ client/btpclient/core.h | 10 +++ 5 files changed, 189 insertions(+), 126 deletions(-) create mode 100644 client/btpclient/btpclient.h create mode 100644 client/btpclient/core.c create mode 100644 client/btpclient/core.h
Makefile.tools +3 -1
@@ -586,7 +586,9 @@ if BTPCLIENT noinst_PROGRAMS += client/btpclient/btpclient client/btpclient/btpclientctl client_btpclient_btpclient_SOURCES = client/btpclient/btpclient.c \ - src/shared/btp.c src/shared/btp.h + client/btpclient/btpclient.h \ + src/shared/btp.c src/shared/btp.h \ + client/btpclient/core.c client/btpclient/core.h client_btpclient_btpclient_LDADD = lib/libbluetooth-internal.la \ src/libshared-ell.la $(ell_ldadd) client/btpclient/btpclient.$(OBJEXT): src/libshared-ell.la ell/internal
client/btpclient/btpclient.c +14 -125
165 lines not on this page · raw message
client/btpclient/btpclient.h new file +12 -0
@@ -0,0 +1,12 @@ +// SPDX-License-Identifier: LGPL-2.1-or-later +/* +* +* BlueZ - Bluetooth protocol stack for Linux +* +* Copyright (C) 2011-2017 Intel Corporation. All rights reserved. +* +*/ + +bool gap_register_service (void ); +void gap_unregister_service (void ); +bool gap_is_service_registered (void );
client/btpclient/core.c new file +150 -0
150 lines not on this page · raw message
client/btpclient/core.h new file +10 -0
@@ -0,0 +1,10 @@ +// SPDX-License-Identifier: LGPL-2.1-or-later +/* +* +* BlueZ - Bluetooth protocol stack for Linux +* +* Copyright (C) 2011-2017 Intel Corporation. All rights reserved. +* +*/ + +void core_register_service (struct btp *btp);
Signature · 1 line
2.43.0
PATCH v2 3/3 client/btpclient: Move btp GAP service in its own file
In reply to Frédéric DanisMoving the btp services in their own files will simplify maintenance.
---v1->v2: Fix make distcheck
Makefile.tools | 3 +-
client/btpclient/btpclient.c | 2710 +----------------------
client/btpclient/btpclient.h | 41 +-
client/btpclient/core.c | 11 +-
client/btpclient/core.h | 3 +-
client/btpclient/{btpclient.c => gap.c} | 603 +----
client/btpclient/gap.h | 17 +
7 files changed, 167 insertions(+), 3221 deletions(-)
copy client/btpclient/{btpclient.c => gap.c} (84%)
create mode 100644 client/btpclient/gap.hMakefile.tools +2 -1
@@ -588,7 +588,8 @@ noinst_PROGRAMS += client/btpclient/btpclient client/btpclient/btpclientctl client_btpclient_btpclient_SOURCES = client/btpclient/btpclient.c \ client/btpclient/btpclient.h \ src/shared/btp.c src/shared/btp.h \ - client/btpclient/core.c client/btpclient/core.h + client/btpclient/core.c client/btpclient/core.h \ + client/btpclient/gap.c client/btpclient/gap.h client_btpclient_btpclient_LDADD = lib/libbluetooth-internal.la \ src/libshared-ell.la $(ell_ldadd) client/btpclient/btpclient.$(OBJEXT): src/libshared-ell.la ell/internal
client/btpclient/btpclient.c +24 -2686
2,808 lines not on this page · raw message
client/btpclient/btpclient.h +38 -3
44 lines not on this page · raw message
client/btpclient/core.c +8 -3
@@ -13,8 +13,10 @@#include "src/shared/btp.h" #include "btpclient.h" #include "core.h" +#include "gap.h" static struct btp *btp; +static struct l_dbus *dbus;static void btp_core_read_commands (uint8_t index,const void *param,uint16_t length,void *user_data)
@@ -57,6 +59,7 @@ static void btp_core_read_services(uint8_t index, const void *param,static void btp_core_register (uint8_t index,const void *param,uint16_t length,void *user_data) { +struct l_dbus_client *client = user_data;const struct btp_core_register_cp *cp = param;if (length <sizeof (*cp))
@@ -73,7 +76,7 @@ static void btp_core_register(uint8_t index, const void *param,if (gap_is_service_registered ()) goto failed; -if (!gap_register_service ()) +if (!gap_register_service (btp, dbus, client)) goto failed;return ;
@@ -130,9 +133,11 @@ failed:btp_send_error (btp,BTP_CORE_SERVICE , index,BTP_ERROR_FAIL ); } -void core_register_service (struct btp *btp_) +void core_register_service (struct btp *btp_,struct l_dbus *dbus_, +struct l_dbus_client *client) { btp = btp_; + dbus = dbus_; btp_register(btp, BTP_CORE_SERVICE, BTP_OP_CORE_READ_SUPPORTED_COMMANDS,
@@ -143,7 +148,7 @@ void core_register_service(struct btp *btp_) btp_core_read_services, NULL, NULL);btp_register (btp,BTP_CORE_SERVICE ,BTP_OP_CORE_REGISTER , - btp_core_register,NULL ,NULL ); + btp_core_register, client,NULL );btp_register (btp,BTP_CORE_SERVICE ,BTP_OP_CORE_UNREGISTER , btp_core_unregister,NULL ,NULL );
client/btpclient/core.h +2 -1
@@ -7,4 +7,5 @@* */ -void core_register_service (struct btp *btp); +void core_register_service (struct btp *btp,struct l_dbus *dbus, +struct l_dbus_client *client);
client/btpclient/gap.c renamed from client/btpclient/btpclient.c +76 -527
88 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.43.0
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=1054670
---Test result---
Test Summary:
CheckPatch PENDING 0.29 seconds GitLint PENDING 0.39 seconds BuildEll PASS 21.62 seconds BluezMake PASS 654.76 seconds MakeCheck PASS 19.41 seconds MakeDistcheck PASS 254.37 seconds CheckValgrind PASS 305.35 seconds CheckSmatch PASS 371.69 seconds bluezmakeextell PASS 188.69 seconds IncrementalBuild PENDING 0.37 seconds ScanBuild PASS 1065.88 seconds
Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:
##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:
##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series Output:
---
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 10 lines · On Mon, 16 Feb 2026 20:31:34 +0100 you wrote:
This prepares the split of btp services in per profile files for easier maintenance.
--- .gitignore | 4 ++-- Makefile.tools | 13 +++++++------ {tools => client/btpclient}/btpclient.c | 0 {tools => client/btpclient}/btpclientctl.c | 0 4 files changed, 9 insertions(+), 8 deletions(-) rename {tools => client/btpclient}/btpclient.c (100%) rename {tools => client/btpclient}/btpclientctl.c (100%)
Here is the summary with links:
- [BlueZ,v2,1/3] tools/btpclient: Move btpclient to client/btpclient directory
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=a98f3d5abf14 - [BlueZ,v2,2/3] client/btpclient: Move btp core service in its own file https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=e1c7988308e5
- [BlueZ,v2,3/3] client/btpclient: Move btp GAP service in its own file (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