From 9cc60e22ec11137ec21e135a5684f3934ff55cb4 Mon Sep 17 00:00:00 2001 From: Alex Barney Date: Tue, 24 Mar 2020 23:08:35 -0700 Subject: [PATCH] Add loader and libhac results --- build/CodeGen/result_modules.csv | 4 +- build/CodeGen/result_paths.csv | 4 +- build/CodeGen/results.csv | 46 +++++++++++++++- src/LibHac/Common/ResultLibHac.cs | 27 ++++++++++ src/LibHac/Loader/ResultLoader.cs | 87 +++++++++++++++++++++++++++++++ 5 files changed, 165 insertions(+), 3 deletions(-) create mode 100644 src/LibHac/Common/ResultLibHac.cs create mode 100644 src/LibHac/Loader/ResultLoader.cs diff --git a/build/CodeGen/result_modules.csv b/build/CodeGen/result_modules.csv index ffd4d6e4..3edc8e78 100644 --- a/build/CodeGen/result_modules.csv +++ b/build/CodeGen/result_modules.csv @@ -1,4 +1,6 @@ Name,Index Fs,2 +Loader,9 Kvdb,20 -Sdmmc,24 \ No newline at end of file +Sdmmc,24 +LibHac,428 \ No newline at end of file diff --git a/build/CodeGen/result_paths.csv b/build/CodeGen/result_paths.csv index cca028c2..d29d8f20 100644 --- a/build/CodeGen/result_paths.csv +++ b/build/CodeGen/result_paths.csv @@ -1,4 +1,6 @@ Name,Namespace,Path Fs,LibHac.Fs,LibHac/Fs/ResultFs.cs +Loader,LibHac.Loader,LibHac/Loader/ResultLoader.cs Kvdb,LibHac.Kvdb,LibHac/Kvdb/ResultKvdb.cs -Sdmmc,LibHac.FsService,LibHac/FsService/ResultSdmmc.cs \ No newline at end of file +Sdmmc,LibHac.FsService,LibHac/FsService/ResultSdmmc.cs +LibHac,LibHac.Common,LibHac/Common/ResultLibHac.cs \ No newline at end of file diff --git a/build/CodeGen/results.csv b/build/CodeGen/results.csv index 64ad0bfb..9536079e 100644 --- a/build/CodeGen/results.csv +++ b/build/CodeGen/results.csv @@ -229,6 +229,45 @@ Module,DescriptionStart,DescriptionEnd,Name,Summary 2,6905,,NotMounted, 2,6906,,SaveDataIsExtending, +9,1,,TooLongArgument, +9,2,,TooManyArguments, +9,3,,TooLargeMeta, +9,4,,InvalidMeta, +9,5,,InvalidNso, +9,6,,InvalidPath, +9,7,,TooManyProcesses, +9,8,,NotPinned, +9,9,,InvalidProgramId, +9,10,,InvalidVersion, + +9,51,,InsufficientAddressSpace, +9,52,,InvalidNro, +9,53,,InvalidNrr, +9,54,,InvalidSignature, +9,55,,InsufficientNroRegistrations, +9,56,,InsufficientNrrRegistrations, +9,57,,NroAlreadyLoaded, + +9,81,,InvalidAddress, +9,82,,InvalidSize, +9,84,,NotLoaded, +9,85,,NotRegistered, +9,86,,InvalidSession, +9,87,,InvalidProcess, + +9,100,,UnknownCapability, +9,103,,InvalidCapabilityKernelFlags, +9,104,,InvalidCapabilitySyscallMask, +9,106,,InvalidCapabilityMapRange, +9,107,,InvalidCapabilityMapPage, +9,111,,InvalidCapabilityInterruptPair, +9,113,,InvalidCapabilityApplicationType, +9,114,,InvalidCapabilityKernelVersion, +9,115,,InvalidCapabilityHandleTable, +9,116,,InvalidCapabilityDebugFlags, + +9,200,,InternalError, + 20,1,,TooLargeKeyOrDbFull, 20,2,,KeyNotFound, 20,4,,AllocationFailed, @@ -261,4 +300,9 @@ Module,DescriptionStart,DescriptionEnd,Name,Summary 205,110,,IrsensorUnconnected, 205,111,,IrsensorUnsupported, 205,120,,IrsensorNotReady, -205,122,139,IrsensorDeviceError, \ No newline at end of file +205,122,139,IrsensorDeviceError, + +428,1,49,InvalidArgument, +428,2,,NullArgument, +428,3,,ArgumentOutOfRange, +428,4,,BufferTooSmall, diff --git a/src/LibHac/Common/ResultLibHac.cs b/src/LibHac/Common/ResultLibHac.cs new file mode 100644 index 00000000..5114db1c --- /dev/null +++ b/src/LibHac/Common/ResultLibHac.cs @@ -0,0 +1,27 @@ +//----------------------------------------------------------------------------- +// This file was automatically generated. +// Changes to this file will be lost when the file is regenerated. +// +// To change this file, modify /build/CodeGen/results.csv at the root of this +// repo and run the build script. +// +// The script can be run with the "codegen" option to run only the +// code generation portion of the build. +//----------------------------------------------------------------------------- + +namespace LibHac.Common +{ + public static class ResultLibHac + { + public const int ModuleLibHac = 428; + + /// Error code: 2428-0001; Range: 1-49; Inner value: 0x3ac + public static Result.Base InvalidArgument => new Result.Base(ModuleLibHac, 1, 49); + /// Error code: 2428-0002; Inner value: 0x5ac + public static Result.Base NullArgument => new Result.Base(ModuleLibHac, 2); + /// Error code: 2428-0003; Inner value: 0x7ac + public static Result.Base ArgumentOutOfRange => new Result.Base(ModuleLibHac, 3); + /// Error code: 2428-0004; Inner value: 0x9ac + public static Result.Base BufferTooSmall => new Result.Base(ModuleLibHac, 4); + } +} diff --git a/src/LibHac/Loader/ResultLoader.cs b/src/LibHac/Loader/ResultLoader.cs new file mode 100644 index 00000000..1fe998d5 --- /dev/null +++ b/src/LibHac/Loader/ResultLoader.cs @@ -0,0 +1,87 @@ +//----------------------------------------------------------------------------- +// This file was automatically generated. +// Changes to this file will be lost when the file is regenerated. +// +// To change this file, modify /build/CodeGen/results.csv at the root of this +// repo and run the build script. +// +// The script can be run with the "codegen" option to run only the +// code generation portion of the build. +//----------------------------------------------------------------------------- + +namespace LibHac.Loader +{ + public static class ResultLoader + { + public const int ModuleLoader = 9; + + /// Error code: 2009-0001; Inner value: 0x209 + public static Result.Base TooLongArgument => new Result.Base(ModuleLoader, 1); + /// Error code: 2009-0002; Inner value: 0x409 + public static Result.Base TooManyArguments => new Result.Base(ModuleLoader, 2); + /// Error code: 2009-0003; Inner value: 0x609 + public static Result.Base TooLargeMeta => new Result.Base(ModuleLoader, 3); + /// Error code: 2009-0004; Inner value: 0x809 + public static Result.Base InvalidMeta => new Result.Base(ModuleLoader, 4); + /// Error code: 2009-0005; Inner value: 0xa09 + public static Result.Base InvalidNso => new Result.Base(ModuleLoader, 5); + /// Error code: 2009-0006; Inner value: 0xc09 + public static Result.Base InvalidPath => new Result.Base(ModuleLoader, 6); + /// Error code: 2009-0007; Inner value: 0xe09 + public static Result.Base TooManyProcesses => new Result.Base(ModuleLoader, 7); + /// Error code: 2009-0008; Inner value: 0x1009 + public static Result.Base NotPinned => new Result.Base(ModuleLoader, 8); + /// Error code: 2009-0009; Inner value: 0x1209 + public static Result.Base InvalidProgramId => new Result.Base(ModuleLoader, 9); + /// Error code: 2009-0010; Inner value: 0x1409 + public static Result.Base InvalidVersion => new Result.Base(ModuleLoader, 10); + /// Error code: 2009-0051; Inner value: 0x6609 + public static Result.Base InsufficientAddressSpace => new Result.Base(ModuleLoader, 51); + /// Error code: 2009-0052; Inner value: 0x6809 + public static Result.Base InvalidNro => new Result.Base(ModuleLoader, 52); + /// Error code: 2009-0053; Inner value: 0x6a09 + public static Result.Base InvalidNrr => new Result.Base(ModuleLoader, 53); + /// Error code: 2009-0054; Inner value: 0x6c09 + public static Result.Base InvalidSignature => new Result.Base(ModuleLoader, 54); + /// Error code: 2009-0055; Inner value: 0x6e09 + public static Result.Base InsufficientNroRegistrations => new Result.Base(ModuleLoader, 55); + /// Error code: 2009-0056; Inner value: 0x7009 + public static Result.Base InsufficientNrrRegistrations => new Result.Base(ModuleLoader, 56); + /// Error code: 2009-0057; Inner value: 0x7209 + public static Result.Base NroAlreadyLoaded => new Result.Base(ModuleLoader, 57); + /// Error code: 2009-0081; Inner value: 0xa209 + public static Result.Base InvalidAddress => new Result.Base(ModuleLoader, 81); + /// Error code: 2009-0082; Inner value: 0xa409 + public static Result.Base InvalidSize => new Result.Base(ModuleLoader, 82); + /// Error code: 2009-0084; Inner value: 0xa809 + public static Result.Base NotLoaded => new Result.Base(ModuleLoader, 84); + /// Error code: 2009-0085; Inner value: 0xaa09 + public static Result.Base NotRegistered => new Result.Base(ModuleLoader, 85); + /// Error code: 2009-0086; Inner value: 0xac09 + public static Result.Base InvalidSession => new Result.Base(ModuleLoader, 86); + /// Error code: 2009-0087; Inner value: 0xae09 + public static Result.Base InvalidProcess => new Result.Base(ModuleLoader, 87); + /// Error code: 2009-0100; Inner value: 0xc809 + public static Result.Base UnknownCapability => new Result.Base(ModuleLoader, 100); + /// Error code: 2009-0103; Inner value: 0xce09 + public static Result.Base InvalidCapabilityKernelFlags => new Result.Base(ModuleLoader, 103); + /// Error code: 2009-0104; Inner value: 0xd009 + public static Result.Base InvalidCapabilitySyscallMask => new Result.Base(ModuleLoader, 104); + /// Error code: 2009-0106; Inner value: 0xd409 + public static Result.Base InvalidCapabilityMapRange => new Result.Base(ModuleLoader, 106); + /// Error code: 2009-0107; Inner value: 0xd609 + public static Result.Base InvalidCapabilityMapPage => new Result.Base(ModuleLoader, 107); + /// Error code: 2009-0111; Inner value: 0xde09 + public static Result.Base InvalidCapabilityInterruptPair => new Result.Base(ModuleLoader, 111); + /// Error code: 2009-0113; Inner value: 0xe209 + public static Result.Base InvalidCapabilityApplicationType => new Result.Base(ModuleLoader, 113); + /// Error code: 2009-0114; Inner value: 0xe409 + public static Result.Base InvalidCapabilityKernelVersion => new Result.Base(ModuleLoader, 114); + /// Error code: 2009-0115; Inner value: 0xe609 + public static Result.Base InvalidCapabilityHandleTable => new Result.Base(ModuleLoader, 115); + /// Error code: 2009-0116; Inner value: 0xe809 + public static Result.Base InvalidCapabilityDebugFlags => new Result.Base(ModuleLoader, 116); + /// Error code: 2009-0200; Inner value: 0x19009 + public static Result.Base InternalError => new Result.Base(ModuleLoader, 200); + } +}