ro: rename ModuleType to reflect reality

This commit is contained in:
Michael Scire 2020-09-08 15:05:15 -07:00
parent 1cccb6efc4
commit b7d99b732a
10 changed files with 39 additions and 39 deletions

View file

@ -27,7 +27,7 @@ namespace ams::ro::impl {
AMS_SF_METHOD_INFO(C, H, 2, Result, RegisterModuleInfo, (const sf::ClientProcessId &client_pid, u64 nrr_address, u64 nrr_size)) \
AMS_SF_METHOD_INFO(C, H, 3, Result, UnregisterModuleInfo, (const sf::ClientProcessId &client_pid, u64 nrr_address)) \
AMS_SF_METHOD_INFO(C, H, 4, Result, RegisterProcessHandle, (const sf::ClientProcessId &client_pid, sf::CopyHandle process_h)) \
AMS_SF_METHOD_INFO(C, H, 10, Result, RegisterModuleInfoEx, (const sf::ClientProcessId &client_pid, u64 nrr_address, u64 nrr_size, sf::CopyHandle process_h), hos::Version_7_0_0)
AMS_SF_METHOD_INFO(C, H, 10, Result, RegisterProcessModuleInfo, (const sf::ClientProcessId &client_pid, u64 nrr_address, u64 nrr_size, sf::CopyHandle process_h), hos::Version_7_0_0)
AMS_SF_DEFINE_INTERFACE(IRoInterface, AMS_RO_I_RO_INTERFACE_INTERFACE_INFO)

View file

@ -20,10 +20,11 @@
namespace ams::ro {
enum class ModuleType : u8 {
ForSelf = 0,
ForOthers = 1,
Count
enum NrrKind : u8 {
NrrKind_User = 0,
NrrKind_JitPlugin = 1,
NrrKind_Count,
};
struct ModuleId {
@ -54,7 +55,7 @@ namespace ams::ro {
u8 signature[0x100];
ncm::ProgramId program_id;
u32 size;
u8 type; /* 7.0.0+ */
u8 nrr_kind; /* 7.0.0+ */
u8 reserved_33D[3];
u32 hashes_offset;
u32 num_hashes;
@ -68,10 +69,10 @@ namespace ams::ro {
return (static_cast<u64>(this->program_id) & this->certification.program_id_mask) == this->certification.program_id_pattern;
}
ModuleType GetType() const {
const ModuleType type = static_cast<ModuleType>(this->type);
AMS_ABORT_UNLESS(type < ModuleType::Count);
return type;
NrrKind GetNrrKind() const {
const NrrKind kind = static_cast<NrrKind>(this->nrr_kind);
AMS_ABORT_UNLESS(kind < NrrKind_Count);
return kind;
}
ncm::ProgramId GetProgramId() const {