kern: KDevicePageTable::Finalize, InfoType_RandomEntropy

This commit is contained in:
Michael Scire 2020-07-21 03:30:18 -07:00 committed by SciresM
parent 0c82709af4
commit 3265927ed7
3 changed files with 50 additions and 1 deletions

View file

@ -132,6 +132,18 @@ namespace ams::kern::svc {
}
}
break;
case ams::svc::InfoType_RandomEntropy:
{
/* Verify the input handle is invalid. */
R_UNLESS(handle == ams::svc::InvalidHandle, svc::ResultInvalidHandle());
/* Verify the requested entropy is valid. */
R_UNLESS(info_subtype < 4, svc::ResultInvalidCombination());
/* Get the entropy. */
*out = GetCurrentProcess().GetRandomEntropy(info_subtype);
}
break;
default:
return svc::ResultInvalidEnumValue();
}