File tree Expand file tree Collapse file tree
suites/Connectivity/Bluetooth/BT_SCAN_PAIR Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#! /bin/sh
2-
32# Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
43# SPDX-License-Identifier: BSD-3-Clause
54# Robustly find and source init_env
@@ -107,6 +106,7 @@ check_dependencies bluetoothctl rfkill expect hciconfig || {
107106 exit 0
108107}
109108
109+ # shellcheck disable=SC2317 # cleanup is invoked via trap
110110cleanup_bt_test () {
111111 # Cleanup only the primary MAC we worked with (if any)
112112 [ -n " $BT_MAC " ] && bt_cleanup_paired_device " $BT_MAC "
Original file line number Diff line number Diff line change @@ -85,25 +85,6 @@ retry_command_bt() {
8585 return 1
8686}
8787
88- # Check if a device (MAC or Name) is in the whitelist
89- bt_in_whitelist () {
90- device_name=" $1 "
91- device_mac=" $2 "
92-
93- whitelist_value=" ${WHITELIST:- } "
94- log_info " Checking if MAC='$device_mac ' or NAME='$device_name ' is in whitelist: '$whitelist_value '"
95-
96- echo " $whitelist_value " | tr -s ' ' ' \n' | while IFS= read -r allowed; do
97- if [ " $allowed " = " $device_mac " ] || [ " $allowed " = " $device_name " ]; then
98- log_info " MAC or NAME matched and allowed: $allowed "
99- return 0
100- fi
101- done
102-
103- log_info " MAC matched but neither MAC nor NAME in whitelist"
104- return 1
105- }
106-
10788# bt_parse_whitelist <whitelist_file>
10889# Reads a whitelist file where each line has:
10990bt_parse_whitelist () {
You can’t perform that action at this time.
0 commit comments