nyx: Add SD Card error report in Console Info

This commit is contained in:
CTCaer
2020-04-30 01:09:48 +03:00
parent 96654d9620
commit 67ae7b9dcb
4 changed files with 72 additions and 0 deletions

View File

@@ -187,6 +187,8 @@ reinit_try:
else
retries--;
sd_error_count_increment(SD_ERROR_RW_RETRY);
msleep(50);
} while (retries);
@@ -195,10 +197,16 @@ reinit_try:
{
int res;
sd_error_count_increment(SD_ERROR_RW_FAIL);
if (!first_reinit)
res = sd_initialize(true);
else
{
res = sd_init_retry(true);
if (!res)
sd_error_count_increment(SD_ERROR_INIT_FAIL);
}
retries = 3;
first_reinit = true;