From d2766b22258db1548ff941d0347fdd0add06c136 Mon Sep 17 00:00:00 2001 From: Pol Henarejos Date: Thu, 26 May 2022 14:16:32 +0200 Subject: [PATCH] Using printf instead of TU --- src/hsm/sc_hsm.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/hsm/sc_hsm.c b/src/hsm/sc_hsm.c index 0d14ef8..4fbd670 100644 --- a/src/hsm/sc_hsm.c +++ b/src/hsm/sc_hsm.c @@ -74,70 +74,70 @@ void scan_files() { file_pin1 = search_by_fid(0x1081, NULL, SPECIFY_EF); if (file_pin1) { if (!file_pin1->data) { - TU_LOG1("PIN1 is empty. Initializing with default password\r\n"); + printf("PIN1 is empty. Initializing with default password\r\n"); const uint8_t empty[33] = { 0 }; flash_write_data_to_file(file_pin1, empty, sizeof(empty)); } } else { - TU_LOG1("FATAL ERROR: PIN1 not found in memory!\r\n"); + printf("FATAL ERROR: PIN1 not found in memory!\r\n"); } file_sopin = search_by_fid(0x1088, NULL, SPECIFY_EF); if (file_sopin) { if (!file_sopin->data) { - TU_LOG1("SOPIN is empty. Initializing with default password\r\n"); + printf("SOPIN is empty. Initializing with default password\r\n"); const uint8_t empty[33] = { 0 }; flash_write_data_to_file(file_sopin, empty, sizeof(empty)); } } else { - TU_LOG1("FATAL ERROR: SOPIN not found in memory!\r\n"); + printf("FATAL ERROR: SOPIN not found in memory!\r\n"); } file_retries_pin1 = search_by_fid(0x1083, NULL, SPECIFY_EF); if (file_retries_pin1) { if (!file_retries_pin1->data) { - TU_LOG1("Retries PIN1 is empty. Initializing with default retriesr\n"); + printf("Retries PIN1 is empty. Initializing with default retriesr\n"); const uint8_t retries = 3; flash_write_data_to_file(file_retries_pin1, &retries, sizeof(uint8_t)); } } else { - TU_LOG1("FATAL ERROR: Retries PIN1 not found in memory!\r\n"); + printf("FATAL ERROR: Retries PIN1 not found in memory!\r\n"); } file_retries_sopin = search_by_fid(0x108A, NULL, SPECIFY_EF); if (file_retries_sopin) { if (!file_retries_sopin->data) { - TU_LOG1("Retries SOPIN is empty. Initializing with default retries\r\n"); + printf("Retries SOPIN is empty. Initializing with default retries\r\n"); const uint8_t retries = 15; flash_write_data_to_file(file_retries_sopin, &retries, sizeof(uint8_t)); } } else { - TU_LOG1("FATAL ERROR: Retries SOPIN not found in memory!\r\n"); + printf("FATAL ERROR: Retries SOPIN not found in memory!\r\n"); } file_t *tf = NULL; tf = search_by_fid(0x1082, NULL, SPECIFY_EF); if (tf) { if (!tf->data) { - TU_LOG1("Max retries PIN1 is empty. Initializing with default max retriesr\n"); + printf("Max retries PIN1 is empty. Initializing with default max retriesr\n"); const uint8_t retries = 3; flash_write_data_to_file(tf, &retries, sizeof(uint8_t)); } } else { - TU_LOG1("FATAL ERROR: Max Retries PIN1 not found in memory!\r\n"); + printf("FATAL ERROR: Max Retries PIN1 not found in memory!\r\n"); } tf = search_by_fid(0x1089, NULL, SPECIFY_EF); if (tf) { if (!tf->data) { - TU_LOG1("Max Retries SOPIN is empty. Initializing with default max retries\r\n"); + printf("Max Retries SOPIN is empty. Initializing with default max retries\r\n"); const uint8_t retries = 15; flash_write_data_to_file(tf, &retries, sizeof(uint8_t)); } } else { - TU_LOG1("FATAL ERROR: Retries SOPIN not found in memory!\r\n"); + printf("FATAL ERROR: Retries SOPIN not found in memory!\r\n"); } low_flash_available(); }