1
0
Fork 0
forked from suyu/suyu

Merge pull request #1733 from lioncash/ldr

ldr: Clean up error codes
This commit is contained in:
bunnei 2018-11-20 16:13:09 -08:00 committed by GitHub
commit ab292c501c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -16,35 +16,18 @@
namespace Service::LDR { namespace Service::LDR {
namespace ErrCodes { constexpr ResultCode ERROR_INVALID_MEMORY_STATE{ErrorModule::Loader, 51};
enum { constexpr ResultCode ERROR_INVALID_NRO{ErrorModule::Loader, 52};
InvalidMemoryState = 51, constexpr ResultCode ERROR_INVALID_NRR{ErrorModule::Loader, 53};
InvalidNRO = 52, constexpr ResultCode ERROR_MISSING_NRR_HASH{ErrorModule::Loader, 54};
InvalidNRR = 53, constexpr ResultCode ERROR_MAXIMUM_NRO{ErrorModule::Loader, 55};
MissingNRRHash = 54, constexpr ResultCode ERROR_MAXIMUM_NRR{ErrorModule::Loader, 56};
MaximumNRO = 55, constexpr ResultCode ERROR_ALREADY_LOADED{ErrorModule::Loader, 57};
MaximumNRR = 56, constexpr ResultCode ERROR_INVALID_ALIGNMENT{ErrorModule::Loader, 81};
AlreadyLoaded = 57, constexpr ResultCode ERROR_INVALID_SIZE{ErrorModule::Loader, 82};
InvalidAlignment = 81, constexpr ResultCode ERROR_INVALID_NRO_ADDRESS{ErrorModule::Loader, 84};
InvalidSize = 82, constexpr ResultCode ERROR_INVALID_NRR_ADDRESS{ErrorModule::Loader, 85};
InvalidNROAddress = 84, constexpr ResultCode ERROR_NOT_INITIALIZED{ErrorModule::Loader, 87};
InvalidNRRAddress = 85,
NotInitialized = 87,
};
}
constexpr ResultCode ERROR_INVALID_MEMORY_STATE(ErrorModule::Loader, ErrCodes::InvalidMemoryState);
constexpr ResultCode ERROR_INVALID_NRO(ErrorModule::Loader, ErrCodes::InvalidNRO);
constexpr ResultCode ERROR_INVALID_NRR(ErrorModule::Loader, ErrCodes::InvalidNRR);
constexpr ResultCode ERROR_MISSING_NRR_HASH(ErrorModule::Loader, ErrCodes::MissingNRRHash);
constexpr ResultCode ERROR_MAXIMUM_NRO(ErrorModule::Loader, ErrCodes::MaximumNRO);
constexpr ResultCode ERROR_MAXIMUM_NRR(ErrorModule::Loader, ErrCodes::MaximumNRR);
constexpr ResultCode ERROR_ALREADY_LOADED(ErrorModule::Loader, ErrCodes::AlreadyLoaded);
constexpr ResultCode ERROR_INVALID_ALIGNMENT(ErrorModule::Loader, ErrCodes::InvalidAlignment);
constexpr ResultCode ERROR_INVALID_SIZE(ErrorModule::Loader, ErrCodes::InvalidSize);
constexpr ResultCode ERROR_INVALID_NRO_ADDRESS(ErrorModule::Loader, ErrCodes::InvalidNROAddress);
constexpr ResultCode ERROR_INVALID_NRR_ADDRESS(ErrorModule::Loader, ErrCodes::InvalidNRRAddress);
constexpr ResultCode ERROR_NOT_INITIALIZED(ErrorModule::Loader, ErrCodes::NotInitialized);
constexpr u64 MAXIMUM_LOADED_RO = 0x40; constexpr u64 MAXIMUM_LOADED_RO = 0x40;