mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-21 10:25:08 -04:00
kern: add InfoType_IoRegionHint
This commit is contained in:
parent
48f4c526f3
commit
25383db524
3 changed files with 27 additions and 0 deletions
|
@ -297,6 +297,19 @@ namespace ams::kern::svc {
|
|||
*out = GetCurrentProcess().IsPermittedSvc(static_cast<svc::SvcId>(info_subtype));
|
||||
}
|
||||
break;
|
||||
case ams::svc::InfoType_IoRegionHint:
|
||||
{
|
||||
/* Verify the sub-type is valid. */
|
||||
R_UNLESS(info_subtype == 0, svc::ResultInvalidCombination());
|
||||
|
||||
/* Get the io region from its handle. */
|
||||
KScopedAutoObject io_region = GetCurrentProcess().GetHandleTable().GetObject<KIoRegion>(handle);
|
||||
R_UNLESS(io_region.IsNotNull(), svc::ResultInvalidHandle());
|
||||
|
||||
/* Get the io region's address hint. */
|
||||
*out = io_region->GetHint();
|
||||
}
|
||||
break;
|
||||
case ams::svc::InfoType_MesosphereMeta:
|
||||
{
|
||||
/* Verify the handle is invalid. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue