mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-06-02 15:49:48 -04:00
kern: expose mesosphere meta over GetInfo instead of GetSystemInfo
This commit is contained in:
parent
25ba61adae
commit
496f93ccdb
3 changed files with 32 additions and 17 deletions
|
@ -235,6 +235,30 @@ namespace ams::kern::svc {
|
|||
*out = tick_count;
|
||||
}
|
||||
break;
|
||||
case ams::svc::InfoType_MesosphereMeta:
|
||||
{
|
||||
/* Verify the handle is invalid. */
|
||||
R_UNLESS(handle == ams::svc::InvalidHandle, svc::ResultInvalidHandle());
|
||||
|
||||
switch (static_cast<ams::svc::MesosphereMetaInfo>(info_subtype)) {
|
||||
case ams::svc::MesosphereMetaInfo_KernelVersion:
|
||||
{
|
||||
/* Return the supported kernel version. */
|
||||
*out = ams::svc::SupportedKernelVersion;
|
||||
}
|
||||
break;
|
||||
case ams::svc::MesosphereMetaInfo_IsKTraceEnabled:
|
||||
{
|
||||
/* Return whether the kernel supports tracing. */
|
||||
constexpr u64 KTraceValue = ams::kern::IsKTraceEnabled ? 1 : 0;
|
||||
*out = KTraceValue;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return svc::ResultInvalidCombination();
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
{
|
||||
/* For debug, log the invalid info call. */
|
||||
|
@ -294,19 +318,6 @@ namespace ams::kern::svc {
|
|||
R_TRY(GetInitialProcessIdRange(out, static_cast<ams::svc::InitialProcessIdRangeInfo>(info_subtype)));
|
||||
}
|
||||
break;
|
||||
case ams::svc::SystemInfoType_IsMesosphere:
|
||||
{
|
||||
/* Verify the handle is invalid. */
|
||||
R_UNLESS(handle == ams::svc::InvalidHandle, svc::ResultInvalidHandle());
|
||||
|
||||
/* Verify that the sub-type is zero. */
|
||||
R_UNLESS(info_subtype == 0, svc::ResultInvalidCombination());
|
||||
|
||||
/* We don't actually have any data to return. */
|
||||
/* Clear the output. */
|
||||
*out = 0;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return svc::ResultInvalidEnumValue();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue