mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-28 05:34:11 -04:00
kern: KDevicePageTable::Finalize, InfoType_RandomEntropy
This commit is contained in:
parent
0c82709af4
commit
3265927ed7
3 changed files with 50 additions and 1 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue