Skip to content
This repository was archived by the owner on Dec 14, 2025. It is now read-only.

Commit 88ebc79

Browse files
committed
[BT] Add proper prefix for a few logs
1 parent 18a8920 commit 88ebc79

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

main/bluetooth/host.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -107,20 +107,20 @@ static int32_t bt_host_load_bdaddr_from_file(void) {
107107
int32_t ret = -1;
108108

109109
if (stat(BDADDR_FILE, &st) != 0) {
110-
printf("%s: No BDADDR on SD. Using ESP32's MAC\n", __FUNCTION__);
110+
printf("# %s: No BDADDR on SD. Using ESP32's MAC\n", __FUNCTION__);
111111
}
112112
else {
113113
FILE *file = fopen(BDADDR_FILE, "rb");
114114
if (file == NULL) {
115-
printf("%s: failed to open file for reading\n", __FUNCTION__);
115+
printf("# %s: failed to open file for reading\n", __FUNCTION__);
116116
}
117117
else {
118118
uint8_t test_mac[6];
119119
fread((void *)test_mac, sizeof(test_mac), 1, file);
120120
fclose(file);
121121
test_mac[5] -= 2; /* Set base mac to BDADDR-2 so that BDADDR end up what we want */
122122
esp_base_mac_addr_set(test_mac);
123-
printf("%s: Using BDADDR.BIN MAC\n", __FUNCTION__);
123+
printf("# %s: Using BDADDR.BIN MAC\n", __FUNCTION__);
124124
ret = 0;
125125
}
126126
}
@@ -132,13 +132,13 @@ static int32_t bt_host_load_keys_from_file(struct bt_host_link_keys *data) {
132132
int32_t ret = -1;
133133

134134
if (stat(LINK_KEYS_FILE, &st) != 0) {
135-
printf("%s: No link keys on SD. Creating...\n", __FUNCTION__);
135+
printf("# %s: No link keys on SD. Creating...\n", __FUNCTION__);
136136
ret = bt_host_store_keys_on_file(data);
137137
}
138138
else {
139139
FILE *file = fopen(LINK_KEYS_FILE, "rb");
140140
if (file == NULL) {
141-
printf("%s: failed to open file for reading\n", __FUNCTION__);
141+
printf("# %s: failed to open file for reading\n", __FUNCTION__);
142142
}
143143
else {
144144
fread((void *)data, sizeof(*data), 1, file);
@@ -154,7 +154,7 @@ static int32_t bt_host_store_keys_on_file(struct bt_host_link_keys *data) {
154154

155155
FILE *file = fopen(LINK_KEYS_FILE, "wb");
156156
if (file == NULL) {
157-
printf("%s: failed to open file for writing\n", __FUNCTION__);
157+
printf("# %s: failed to open file for writing\n", __FUNCTION__);
158158
}
159159
else {
160160
fwrite((void *)data, sizeof(*data), 1, file);
@@ -411,12 +411,12 @@ int32_t bt_host_init(void) {
411411
esp_bt_controller_config_t bt_cfg = BT_CONTROLLER_INIT_CONFIG_DEFAULT();
412412

413413
if ((ret = esp_bt_controller_init(&bt_cfg)) != ESP_OK) {
414-
printf("Bluetooth controller initialize failed: %s", esp_err_to_name(ret));
414+
printf("# Bluetooth controller initialize failed: %s", esp_err_to_name(ret));
415415
return ret;
416416
}
417417

418418
if ((ret = esp_bt_controller_enable(ESP_BT_MODE_BTDM)) != ESP_OK) {
419-
printf("Bluetooth controller enable failed: %s", esp_err_to_name(ret));
419+
printf("# Bluetooth controller enable failed: %s", esp_err_to_name(ret));
420420
return ret;
421421
}
422422

@@ -426,7 +426,7 @@ int32_t bt_host_init(void) {
426426

427427
txq_hdl = xRingbufferCreate(256*8, RINGBUF_TYPE_NOSPLIT);
428428
if (txq_hdl == NULL) {
429-
printf("Failed to create ring buffer\n");
429+
printf("# Failed to create ring buffer\n");
430430
return ret;
431431
}
432432

0 commit comments

Comments
 (0)