python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / tools / misc / sixpair / hcitool.patch
blobb66e791dd0e0b6d125cfac00f7541c78cf5a8fc9
1 diff --git a/sixpair.c b/sixpair.c
2 index b009a6f..78b7ef0 100644
3 --- a/sixpair.c
4 +++ b/sixpair.c
5 @@ -76,11 +76,11 @@ void process_device(int argc, char **argv, struct usb_device *dev,
6 exit(1);
8 } else {
9 - FILE *f = popen("hcitool dev", "r");
10 + FILE *f = popen("bluetoothctl list", "r");
11 if ( !f ||
12 - fscanf(f, "%*s\n%*s %x:%x:%x:%x:%x:%x",
13 + fscanf(f, "%*s %x:%x:%x:%x:%x:%x",
14 &mac[0],&mac[1],&mac[2],&mac[3],&mac[4],&mac[5]) != 6 ) {
15 - printf("Unable to retrieve local bd_addr from `hcitool dev`.\n");
16 + printf("Unable to retrieve local bd_addr from `bluetoothctl list`.\n");
17 printf("Please enable Bluetooth or specify an address manually.\n");
18 exit(1);