mirror of
https://github.com/DarkMatterCore/nxdumptool.git
synced 2024-11-22 18:26:39 +00:00
Supress unnecessary log messages.
This commit is contained in:
parent
ee5a08f5d9
commit
8a54ea4823
3 changed files with 14 additions and 4 deletions
|
@ -215,6 +215,8 @@ void gamecardExit(void)
|
|||
{
|
||||
mutexLock(&g_gamecardMutex);
|
||||
|
||||
if (!g_gamecardInterfaceInit) goto end;
|
||||
|
||||
/* Destroy gamecard detection thread. */
|
||||
if (g_gameCardDetectionThreadCreated)
|
||||
{
|
||||
|
@ -252,6 +254,7 @@ void gamecardExit(void)
|
|||
|
||||
g_gamecardInterfaceInit = false;
|
||||
|
||||
end:
|
||||
mutexUnlock(&g_gamecardMutex);
|
||||
}
|
||||
|
||||
|
@ -822,7 +825,7 @@ static bool gamecardGetHandleAndStorage(u32 partition)
|
|||
rc = fsDeviceOperatorGetGameCardHandle(&g_deviceOperator, &g_gameCardHandle);
|
||||
if (R_FAILED(rc))
|
||||
{
|
||||
LOGFILE("fsDeviceOperatorGetGameCardHandle failed on try #%u! (0x%08X).", i + 1, rc);
|
||||
//LOGFILE("fsDeviceOperatorGetGameCardHandle failed on try #%u! (0x%08X).", i + 1, rc);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -831,7 +834,7 @@ static bool gamecardGetHandleAndStorage(u32 partition)
|
|||
if (R_FAILED(rc))
|
||||
{
|
||||
gamecardCloseHandle(); /* Close invalid gamecard handle. */
|
||||
LOGFILE("fsOpenGameCardStorage failed to open %s storage area on try #%u! (0x%08X).", GAMECARD_STORAGE_AREA_NAME(partition + 1), i + 1, rc);
|
||||
//LOGFILE("fsOpenGameCardStorage failed to open %s storage area on try #%u! (0x%08X).", GAMECARD_STORAGE_AREA_NAME(partition + 1), i + 1, rc);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -839,6 +842,8 @@ static bool gamecardGetHandleAndStorage(u32 partition)
|
|||
break;
|
||||
}
|
||||
|
||||
if (R_FAILED(rc)) LOGFILE("fsDeviceOperatorGetGameCardHandle / fsOpenGameCardStorage failed! (0x%08X).", rc);
|
||||
|
||||
return R_SUCCEEDED(rc);
|
||||
}
|
||||
|
||||
|
|
|
@ -480,13 +480,15 @@ static u32 usbSendCommand(size_t cmd_size)
|
|||
|
||||
if (!usbWrite(g_usbTransferBuffer, cmd_size))
|
||||
{
|
||||
LOGFILE("Failed to write 0x%lX bytes long block for type 0x%X command!", cmd_size, cmd);
|
||||
/* Log error message only if the USB session has been started, or if thread exit flag hasn't been enabled. */
|
||||
if (g_usbSessionStarted || !g_usbDetectionThreadExitFlag) LOGFILE("Failed to write 0x%lX bytes long block for type 0x%X command!", cmd_size, cmd);
|
||||
return UsbStatusType_WriteCommandFailed;
|
||||
}
|
||||
|
||||
if (!usbRead(g_usbTransferBuffer, sizeof(UsbStatus)))
|
||||
{
|
||||
LOGFILE("Failed to read 0x%lX bytes long status block for type 0x%X command!", sizeof(UsbStatus), cmd);
|
||||
/* Log error message only if the USB session has been started, or if thread exit flag hasn't been enabled. */
|
||||
if (g_usbSessionStarted || !g_usbDetectionThreadExitFlag) LOGFILE("Failed to read 0x%lX bytes long status block for type 0x%X command!", sizeof(UsbStatus), cmd);
|
||||
return UsbStatusType_ReadStatusFailed;
|
||||
}
|
||||
|
||||
|
|
|
@ -148,6 +148,8 @@ void utilsCloseResources(void)
|
|||
{
|
||||
mutexLock(&g_resourcesMutex);
|
||||
|
||||
if (!g_resourcesInitialized) goto end;
|
||||
|
||||
/* Free LVGL resources. */
|
||||
//lvglHelperExit();
|
||||
|
||||
|
@ -183,6 +185,7 @@ void utilsCloseResources(void)
|
|||
|
||||
g_resourcesInitialized = false;
|
||||
|
||||
end:
|
||||
mutexUnlock(&g_resourcesMutex);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue