rosalina: ndm doesn't exist on SAFE_FIRM

This commit is contained in:
TuxSH 2020-07-16 16:56:59 +01:00
parent 70109fed2c
commit d6e72080d9

View File

@ -87,7 +87,7 @@ Result miniSocInit(void)
ret = SOCU_Initialize(miniSocMemHandle, socContextSize); ret = SOCU_Initialize(miniSocMemHandle, socContextSize);
if(ret != 0) goto cleanup; if(ret != 0) goto cleanup;
if (!exclusiveStateEntered) if (!exclusiveStateEntered && isServiceUsable("ndm:u"))
{ {
ndmuInit(); ndmuInit();
ret = NDMU_EnterExclusiveState(NDM_EXCLUSIVE_STATE_INFRASTRUCTURE); ret = NDMU_EnterExclusiveState(NDM_EXCLUSIVE_STATE_INFRASTRUCTURE);
@ -140,7 +140,7 @@ Result miniSocExitDirect(void)
svcControlMemory(&tmp, socContextAddr, socContextAddr, socContextSize, MEMOP_FREE, MEMPERM_DONTCARE); svcControlMemory(&tmp, socContextAddr, socContextAddr, socContextSize, MEMOP_FREE, MEMPERM_DONTCARE);
if(ret == 0) if(ret == 0)
{ {
if (exclusiveStateEntered) if (exclusiveStateEntered && isServiceUsable("ndm:u"))
{ {
//ndmuInit(); //ndmuInit();
ret = NDMU_UnlockState(); ret = NDMU_UnlockState();