Message ID | 20240927195416.2527923-1-luiz.dentz@gmail.com |
---|---|
State | New |
Headers | show |
Series | [BlueZ,v1,1/2] client/player: Make endpoint.show print all endpoint with no argument | expand |
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=893563 ---Test result--- Test Summary: CheckPatch PASS 0.62 seconds GitLint FAIL 0.69 seconds BuildEll PASS 24.15 seconds BluezMake PASS 1594.08 seconds MakeCheck PASS 13.20 seconds MakeDistcheck PASS 179.98 seconds CheckValgrind PASS 252.34 seconds CheckSmatch PASS 356.04 seconds bluezmakeextell PASS 119.47 seconds IncrementalBuild PASS 2854.97 seconds ScanBuild WARNING 1035.22 seconds Details ############################## Test: GitLint - FAIL Desc: Run gitlint Output: [BlueZ,v1,1/2] client/player: Make endpoint.show print all endpoint with no argument WARNING: I3 - ignore-body-lines: gitlint will be switching from using Python regex 'match' (match beginning) to 'search' (match anywhere) semantics. Please review your ignore-body-lines.regex option accordingly. To remove this warning, set general.regex-style-search=True. More details: https://jorisroovers.github.io/gitlint/configuration/#regex-style-search 1: T1 Title exceeds max length (84>80): "[BlueZ,v1,1/2] client/player: Make endpoint.show print all endpoint with no argument" 10: B3 Line contains hard tab characters (\t): " UUID 0000110a-0000-1000-8000-00805f9b34fb" 11: B3 Line contains hard tab characters (\t): " Codec 0x00 (0)" 12: B3 Line contains hard tab characters (\t): " Media Codec: SBC" 13: B3 Line contains hard tab characters (\t): " Channel Modes: Mono DualChannel Stereo JointStereo" 14: B3 Line contains hard tab characters (\t): " Frequencies: 16Khz 32Khz 44.1Khz 48Khz" 15: B3 Line contains hard tab characters (\t): " Subbands: 4 8" 16: B3 Line contains hard tab characters (\t): " Blocks: 4 8 12 16" 17: B3 Line contains hard tab characters (\t): " Bitpool Range: 2-64" 19: B3 Line contains hard tab characters (\t): " UUID 0000110b-0000-1000-8000-00805f9b34fb" 20: B3 Line contains hard tab characters (\t): " Codec 0x00 (0)" 21: B3 Line contains hard tab characters (\t): " Media Codec: SBC" 22: B3 Line contains hard tab characters (\t): " Channel Modes: Mono DualChannel Stereo JointStereo" 23: B3 Line contains hard tab characters (\t): " Frequencies: 16Khz 32Khz 44.1Khz 48Khz" 24: B3 Line contains hard tab characters (\t): " Subbands: 4 8" 25: B3 Line contains hard tab characters (\t): " Blocks: 4 8 12 16" 26: B3 Line contains hard tab characters (\t): " Bitpool Range: 2-64" [BlueZ,v1,2/2] client/player: Make transport.show print all transports with no argument WARNING: I3 - ignore-body-lines: gitlint will be switching from using Python regex 'match' (match beginning) to 'search' (match anywhere) semantics. Please review your ignore-body-lines.regex option accordingly. To remove this warning, set general.regex-style-search=True. More details: https://jorisroovers.github.io/gitlint/configuration/#regex-style-search 1: T1 Title exceeds max length (87>80): "[BlueZ,v1,2/2] client/player: Make transport.show print all transports with no argument" 10: B3 Line contains hard tab characters (\t): " UUID: Audio Source (0000110a-0000-1000-8000-00805f9b34fb)" 11: B3 Line contains hard tab characters (\t): " Codec: 0x02 (2)" 12: B3 Line contains hard tab characters (\t): " Media Codec: MPEG24" 13: B3 Line contains hard tab characters (\t): " Object Types: MPEG-2 AAC LC" 14: B3 Line contains hard tab characters (\t): " Frequencies: 48kHz" 15: B3 Line contains hard tab characters (\t): " Channels: 2" 16: B3 Line contains hard tab characters (\t): " Bitrate: 320000" 17: B3 Line contains hard tab characters (\t): " VBR: Yes" 18: B3 Line contains hard tab characters (\t): " Device: /org/bluez/hci0/dev_XX_XX_XX_XX_XX_XX" 19: B3 Line contains hard tab characters (\t): " State: active" 20: B3 Line contains hard tab characters (\t): " Delay: 0x06a4 (1700)" 21: B3 Line contains hard tab characters (\t): " Volume: 0x0059 (89)" 22: B3 Line contains hard tab characters (\t): " Endpoint: /org/bluez/hci0/dev_94_XX_XX_XX_XX_XX/sep4" ############################## Test: ScanBuild - WARNING Desc: Run Scan Build Output: client/player.c:2206:8: warning: Null pointer passed to 2nd parameter expecting 'nonnull' if (!strcmp(ep->path, pattern)) ^~~~~~~~~~~~~~~~~~~~~~~~~ client/player.c:3476:16: warning: Null pointer passed to 1st parameter expecting 'nonnull' codec->name = strdup(name); ^~~~~~~~~~~~ 2 warnings generated. --- Regards, Linux Bluetooth
Hello: This series was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>: On Fri, 27 Sep 2024 15:54:15 -0400 you wrote: > From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> > > This makes endpoint.show arguments optional and in case none is given > print all (local and remote) endpoints: > > [bluetooth]# endpoint.show > Endpoint /local/endpoint/a2dp_src/sbc > UUID 0000110a-0000-1000-8000-00805f9b34fb > Codec 0x00 (0) > Media Codec: SBC > Channel Modes: Mono DualChannel Stereo JointStereo > Frequencies: 16Khz 32Khz 44.1Khz 48Khz > Subbands: 4 8 > Blocks: 4 8 12 16 > Bitpool Range: 2-64 > Endpoint /local/endpoint/a2dp_snk/sbc > UUID 0000110b-0000-1000-8000-00805f9b34fb > Codec 0x00 (0) > Media Codec: SBC > Channel Modes: Mono DualChannel Stereo JointStereo > Frequencies: 16Khz 32Khz 44.1Khz 48Khz > Subbands: 4 8 > Blocks: 4 8 12 16 > Bitpool Range: 2-64 > > [...] Here is the summary with links: - [BlueZ,v1,1/2] client/player: Make endpoint.show print all endpoint with no argument https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=95c15d2ca02a - [BlueZ,v1,2/2] client/player: Make transport.show print all transports with no argument https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=eda123dc6d8e You are awesome, thank you!
diff --git a/client/player.c b/client/player.c index 31d6f95c292b..39c14a9434cb 100644 --- a/client/player.c +++ b/client/player.c @@ -2828,10 +2828,42 @@ static void print_local_endpoint(struct endpoint *ep) ep->context); } +static void print_endpoint_properties(GDBusProxy *proxy) +{ + bt_shell_printf("Endpoint %s\n", g_dbus_proxy_get_path(proxy)); + + print_property(proxy, "UUID"); + print_property(proxy, "Codec"); + print_capabilities(proxy); + print_property(proxy, "Device"); + print_property(proxy, "DelayReporting"); + print_property(proxy, "Locations"); + print_property(proxy, "SupportedContext"); + print_property(proxy, "Context"); + print_property(proxy, "QoS"); +} + +static void print_endpoints(void *data, void *user_data) +{ + print_endpoint_properties(data); +} + +static void print_local_endpoints(void *data, void *user_data) +{ + print_local_endpoint(data); +} + static void cmd_show_endpoint(int argc, char *argv[]) { GDBusProxy *proxy; + /* Show all endpoints if no argument is given */ + if (argc != 2) { + g_list_foreach(endpoints, print_endpoints, NULL); + g_list_foreach(local_endpoints, print_local_endpoints, NULL); + return bt_shell_noninteractive_quit(EXIT_SUCCESS); + } + proxy = g_dbus_proxy_lookup(endpoints, NULL, argv[1], BLUEZ_MEDIA_ENDPOINT_INTERFACE); if (!proxy) { @@ -2845,17 +2877,7 @@ static void cmd_show_endpoint(int argc, char *argv[]) return bt_shell_noninteractive_quit(EXIT_SUCCESS); } - bt_shell_printf("Endpoint %s\n", g_dbus_proxy_get_path(proxy)); - - print_property(proxy, "UUID"); - print_property(proxy, "Codec"); - print_capabilities(proxy); - print_property(proxy, "Device"); - print_property(proxy, "DelayReporting"); - print_property(proxy, "Locations"); - print_property(proxy, "SupportedContext"); - print_property(proxy, "Context"); - print_property(proxy, "QoS"); + print_endpoint_properties(proxy); return bt_shell_noninteractive_quit(EXIT_SUCCESS); } @@ -4320,7 +4342,7 @@ static const struct bt_shell_menu endpoint_menu = { .entries = { { "list", "[local]", cmd_list_endpoints, "List available endpoints" }, - { "show", "<endpoint>", cmd_show_endpoint, + { "show", "[endpoint]", cmd_show_endpoint, "Endpoint information", endpoint_generator }, { "register", "<UUID> <codec[:company]> [capabilities...]",
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> This makes endpoint.show arguments optional and in case none is given print all (local and remote) endpoints: [bluetooth]# endpoint.show Endpoint /local/endpoint/a2dp_src/sbc UUID 0000110a-0000-1000-8000-00805f9b34fb Codec 0x00 (0) Media Codec: SBC Channel Modes: Mono DualChannel Stereo JointStereo Frequencies: 16Khz 32Khz 44.1Khz 48Khz Subbands: 4 8 Blocks: 4 8 12 16 Bitpool Range: 2-64 Endpoint /local/endpoint/a2dp_snk/sbc UUID 0000110b-0000-1000-8000-00805f9b34fb Codec 0x00 (0) Media Codec: SBC Channel Modes: Mono DualChannel Stereo JointStereo Frequencies: 16Khz 32Khz 44.1Khz 48Khz Subbands: 4 8 Blocks: 4 8 12 16 Bitpool Range: 2-64 --- client/player.c | 46 ++++++++++++++++++++++++++++++++++------------ 1 file changed, 34 insertions(+), 12 deletions(-)