From 6f40b528faaf402c0ec65896b25048d7d2f6e1f7 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Mon, 11 Jun 2018 20:52:30 +0800 Subject: [PATCH] esp32: esp_err_to_name_r: print error code as hex and decimal --- components/esp32/esp_err_to_name.c | 2 +- components/esp32/esp_err_to_name.c.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/esp32/esp_err_to_name.c b/components/esp32/esp_err_to_name.c index b6743c31ea..a85eb0a9ca 100644 --- a/components/esp32/esp_err_to_name.c +++ b/components/esp32/esp_err_to_name.c @@ -473,7 +473,7 @@ const char *esp_err_to_name_r(esp_err_t code, char *buf, size_t buflen) return buf; } - snprintf(buf, buflen, "Unknown error %d", code); + snprintf(buf, buflen, "%s 0x%x(%d)", esp_unknown_msg, code, code); return buf; } diff --git a/components/esp32/esp_err_to_name.c.in b/components/esp32/esp_err_to_name.c.in index b6b87312e9..5f623c62dc 100644 --- a/components/esp32/esp_err_to_name.c.in +++ b/components/esp32/esp_err_to_name.c.in @@ -58,7 +58,7 @@ const char *esp_err_to_name_r(esp_err_t code, char *buf, size_t buflen) return buf; } - snprintf(buf, buflen, "Unknown error %d", code); + snprintf(buf, buflen, "%s 0x%x(%d)", esp_unknown_msg, code, code); return buf; } -- 2.40.0