mirror of
https://github.com/libretro/Lakka-LibreELEC.git
synced 2025-03-01 10:21:22 +00:00
22 lines
721 B
SYSTEMD
22 lines
721 B
SYSTEMD
diff --git a/bluetooth/drivers/bluetoothctl.c b/bluetooth/drivers/bluetoothctl.c
|
|
index 20e3919d0e..16d04cc292 100644
|
|
--- a/bluetooth/drivers/bluetoothctl.c
|
|
+++ b/bluetooth/drivers/bluetoothctl.c
|
|
@@ -225,8 +225,14 @@ static bool bluetoothctl_remove_device(void *data, unsigned idx)
|
|
string_list_free(list);
|
|
|
|
snprintf(btctl->command, sizeof(btctl->command), "\
|
|
- echo -e \"disconnect %s\\nremove %s\\n\" | bluetoothctl",
|
|
- device, device);
|
|
+ bluetoothctl -- disconnect %s",
|
|
+ device);
|
|
+
|
|
+ pclose(popen(btctl->command, "r"));
|
|
+
|
|
+ snprintf(btctl->command, sizeof(btctl->command), "\
|
|
+ bluetoothctl -- remove %s",
|
|
+ device);
|
|
|
|
pclose(popen(btctl->command, "r"));
|
|
|