libstrat: migrate result headers to library

This commit is contained in:
Michael Scire 2019-03-28 14:22:50 -07:00
parent 31c1dc1a82
commit ea5c0f0174
5 changed files with 142 additions and 1 deletions

View File

@ -33,4 +33,6 @@
#include "stratosphere/mitm.hpp"
#include "stratosphere/services.hpp"
#include "stratosphere/services.hpp"
#include "stratosphere/results.hpp"

View File

@ -0,0 +1,21 @@
/*
* Copyright (c) 2018 Atmosphère-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "results/fs_results.hpp"
#include "results/dmnt_results.hpp"
#include "results/creport_results.hpp"

View File

@ -0,0 +1,33 @@
/*
* Copyright (c) 2018 Atmosphère-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include <switch.h>
static constexpr u32 Module_Creport = 168;
static constexpr Result ResultCreportUndefinedInstruction = MAKERESULT(Module_Creport, 0);
static constexpr Result ResultCreportInstructionAbort = MAKERESULT(Module_Creport, 1);
static constexpr Result ResultCreportDataAbort = MAKERESULT(Module_Creport, 2);
static constexpr Result ResultCreportAlignmentFault = MAKERESULT(Module_Creport, 3);
static constexpr Result ResultCreportDebuggerAttached = MAKERESULT(Module_Creport, 4);
static constexpr Result ResultCreportBreakPoint = MAKERESULT(Module_Creport, 5);
static constexpr Result ResultCreportUserBreak = MAKERESULT(Module_Creport, 6);
static constexpr Result ResultCreportDebuggerBreak = MAKERESULT(Module_Creport, 7);
static constexpr Result ResultCreportBadSvc = MAKERESULT(Module_Creport, 8);
static constexpr Result ResultCreportSystemMemoryError = MAKERESULT(Module_Creport, 9);
static constexpr Result ResultCreportIncompleteReport = MAKERESULT(Module_Creport, 99);

View File

@ -0,0 +1,38 @@
/*
* Copyright (c) 2018 Atmosphère-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include <switch.h>
static constexpr u32 Module_Dmnt = 13;
static constexpr Result ResultDmntUnknown = MAKERESULT(Module_Dmnt, 1);
static constexpr Result ResultDmntDebuggingDisabled = MAKERESULT(Module_Dmnt, 2);
static constexpr Result ResultDmntCheatNotAttached = MAKERESULT(Module_Dmnt, 6500);
static constexpr Result ResultDmntCheatNullBuffer = MAKERESULT(Module_Dmnt, 6501);
static constexpr Result ResultDmntCheatInvalidBuffer = MAKERESULT(Module_Dmnt, 6502);
static constexpr Result ResultDmntCheatUnknownChtId = MAKERESULT(Module_Dmnt, 6503);
static constexpr Result ResultDmntCheatOutOfCheats = MAKERESULT(Module_Dmnt, 6504);
static constexpr Result ResultDmntCheatInvalidCheat = MAKERESULT(Module_Dmnt, 6505);
static constexpr Result ResultDmntCheatCannotDisableMasterCheat = MAKERESULT(Module_Dmnt, 6505);
static constexpr Result ResultDmntCheatInvalidFreezeWidth = MAKERESULT(Module_Dmnt, 6600);
static constexpr Result ResultDmntCheatAddressAlreadyFrozen = MAKERESULT(Module_Dmnt, 6601);
static constexpr Result ResultDmntCheatAddressNotFrozen = MAKERESULT(Module_Dmnt, 6602);
static constexpr Result ResultDmntCheatTooManyFrozenAddresses = MAKERESULT(Module_Dmnt, 6603);
static constexpr Result ResultDmntCheatVmInvalidCondDepth = MAKERESULT(Module_Dmnt, 6700);

View File

@ -0,0 +1,47 @@
/*
* Copyright (c) 2018 Atmosphère-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include <switch.h>
static constexpr u32 Module_Fs = 2;
static constexpr Result ResultFsPathNotFound = MAKERESULT(Module_Fs, 1);
static constexpr Result ResultFsPathAlreadyExists = MAKERESULT(Module_Fs, 2);
static constexpr Result ResultFsTargetLocked = MAKERESULT(Module_Fs, 7);
static constexpr Result ResultFsDirectoryNotEmpty = MAKERESULT(Module_Fs, 8);
static constexpr Result ResultFsNotImplemented = MAKERESULT(Module_Fs, 3001);
static constexpr Result ResultFsOutOfRange = MAKERESULT(Module_Fs, 3005);
static constexpr Result ResultFsAllocationFailureInDirectorySaveDataFileSystem = MAKERESULT(Module_Fs, 3321);
static constexpr Result ResultFsAllocationFailureInSubDirectoryFileSystem = MAKERESULT(Module_Fs, 3355);
static constexpr Result ResultFsPreconditionViolation = MAKERESULT(Module_Fs, 6000);
static constexpr Result ResultFsInvalidArgument = MAKERESULT(Module_Fs, 6001);
static constexpr Result ResultFsInvalidPath = MAKERESULT(Module_Fs, 6002);
static constexpr Result ResultFsTooLongPath = MAKERESULT(Module_Fs, 6003);
static constexpr Result ResultFsInvalidCharacter = MAKERESULT(Module_Fs, 6004);
static constexpr Result ResultFsInvalidPathFormat = MAKERESULT(Module_Fs, 6005);
static constexpr Result ResultFsDirectoryUnobtainable = MAKERESULT(Module_Fs, 6006);
static constexpr Result ResultFsNotNormalized = MAKERESULT(Module_Fs, 6007);
static constexpr Result ResultFsInvalidOffset = MAKERESULT(Module_Fs, 6061);
static constexpr Result ResultFsInvalidSize = MAKERESULT(Module_Fs, 6062);
static constexpr Result ResultFsNullptrArgument = MAKERESULT(Module_Fs, 6063);
static constexpr Result ResultFsUnsupportedOperation = MAKERESULT(Module_Fs, 6300);