summaryrefslogtreecommitdiff
path: root/src/core/hle/result.h
AgeCommit message (Collapse)Author
2025-01-30service: Implement rebootless system update stubs and typesZephyron
Adds initial support for rebootless system update related functionality: - Add system archive title IDs for ApplicationBlackList, RebootlessSystemUpdateVersion, and ContentActionTable - Add NS service result codes for system update operations - Implement stubs for ISystemUpdateControl::SetupToReceiveSystemUpdate and RequestCheckLatestUpdateIncludesRebootlessUpdate - Add RebootlessSystemUpdateVersion settings type and implement GetRebootlessSystemUpdateVersion in SET service - Fix GetSettingsItemValueImpl template implementation This provides basic infrastructure for handling system updates, particularly the rebootless update feature, though actual update functionality remains stubbed.
2025-01-25Revert "core/hle: Reorganize ErrorModule enum numerically"Zephyron
This reverts commit b55be320b75d01bdc1320bc78179542b2ce10fb2.
2025-01-25core/hle: Reorganize ErrorModule enum numericallyZephyron
Reorganizes the ErrorModule enum in result.h by grouping error codes into numerical ranges with descriptive comments. This improves readability and makes it easier to: - Find specific modules by their number - See which numbers are used/unused in each range - Understand the overall distribution of module numbers Also standardizes naming conventions across modules and fixes some inconsistent casing (e.g. FS -> Fs, HDCP -> Hdcp). REFS: switchbrew.org/w/index.php?title=Error_codes
2025-01-14Revert incorrect copyright attribution for non-contributed filesZephyron
- In commit b3facaa6bb30cdc39f2b7d632fef1e3bfeee7785, the copyright header was updated to include "Citron Homebrew Project" across multiple files, regardless of whether any contributions were made. - This commit removes the incorrect attribution and reverts the copyright header to its previous state. - Copyright attribution should only be added when meaningful contributions have been made to the file. - This commit ensures proper compliance with copyright standards and maintains correct attribution to the respective contributors. - Special thanks to Tachi for pointing out the need for these corrections and ensuring that proper attribution practices are followed.
2024-12-31core: Update copyright headersZephyron
- Update copyright headers to include Citron Homebrew Project - Add 2025 to copyright years
2024-12-31chore: update project references and add Citron copyrightZephyron
- Replaced all references to the old project name with Citron. - Added Citron copyright information alongside existing notices in all files.
2024-01-25result: Make fully constexpr, add ON_RESULT_INCLUDEDFearlessTobi
2023-11-10kernel: add KPageTableBaseLiam
Co-authored-by: Kelebek1 <eeeedddccc@hotmail.co.uk>
2023-09-16Reimplement HardwareOpusKelebek1
2023-08-08core: remove ResultVal typeLiam
2022-11-14core: Update result moduleNarr the Reg
2022-11-03core: hle: result: Fix code for compilers.bunnei
2022-10-18core: hle: kernel: Use result macros for new/changed code.bunnei
2022-10-18core: hle: result: Add GetInnerValue and Includes methods.bunnei
2022-10-13result: enforce reference check specializationLiam
2022-10-08kernel: add expanded result macrosLiam
2022-09-02Rework audio output, connecting AudioOut into coretiming to fix desync ↵Kelebek1
during heavy loads.
2022-07-27chore: make yuzu REUSE compliantAndrea Pappacoda
[REUSE] is a specification that aims at making file copyright information consistent, so that it can be both human and machine readable. It basically requires that all files have a header containing copyright and licensing information. When this isn't possible, like when dealing with binary assets, generated files or embedded third-party dependencies, it is permitted to insert copyright information in the `.reuse/dep5` file. Oh, and it also requires that all the licenses used in the project are present in the `LICENSES` folder, that's why the diff is so huge. This can be done automatically with `reuse download --all`. The `reuse` tool also contains a handy subcommand that analyzes the project and tells whether or not the project is (still) compliant, `reuse lint`. Following REUSE has a few advantages over the current approach: - Copyright information is easy to access for users / downstream - Files like `dist/license.md` do not need to exist anymore, as `.reuse/dep5` is used instead - `reuse lint` makes it easy to ensure that copyright information of files like binary assets / images is always accurate and up to date To add copyright information of files that didn't have it I looked up who committed what and when, for each file. As yuzu contributors do not have to sign a CLA or similar I couldn't assume that copyright ownership was of the "yuzu Emulator Project", so I used the name and/or email of the commit author instead. [REUSE]: https://reuse.software Follow-up to 01cf05bc75b1e47beb08937439f3ed9339e7b254
2022-06-26core: Replace all instances of ResultCode with Resultgerman77
2022-05-03hle/result: Update std::expected replacement messageMorph
std::expected is included in C++23
2022-05-03hle/result: Add ResultRange overload in ResultValMorph
Also marks the implicit conversion operator as constexpr instead of consteval as the constructor is not constant evaluated.
2022-05-02hle/result: Implement ResultRangeMorph
A ResultRange defines an inclusive range of error descriptions within an error module. This can be used to check whether the description of a given ResultCode falls within the range. The conversion function returns a ResultCode with its description set to description_start.
2021-11-02general: Remove MakeResult helpersMorph
This is made obsolete by the presence of implicit constructors.
2021-11-02hle/result: Amend ResultVal documentationMorph
This amends the documentation slightly to reflect the updated interface.
2021-11-02hle/result: Reimplement ResultVal using Common::ExpectedMorph
Common::Expected effectively provides the same functions as ResultVal, so we can implement it with this. This can be replaced with std::expected with minimal effort should it be standardized in the C++ Standard Template Library.
2021-10-29Merge pull request #7240 from Morph1984/resultval-remove-cvbunnei
hle/result: Remove cv-qualifiers from Arg in MakeResult
2021-10-28hle/result: Declare copy/move constructor/assignment as noexceptMorph
While we're at it, we can also declare these copy/move constructor/assignment as noexcept.
2021-10-28hle/result: Add move assignment operator in ResultValMorph
ResultVal was missing a move assignment operator, add it.
2021-10-28hle/result: Remove cv-qualifiers from Arg in MakeResultMorph
This removes the const qualification for types when MakeResult(arg) is used in a const member function, allowing for automatic deduction and removing the need to manually specify the non-const type as the template argument.
2021-06-05result: Add [[nodiscard]] specifiers where applicableLioncash
The result code classes are used quite extensively throughout both the kernel and service HLE code. We can mark these member functions as [[nodiscard]] to prevent a few logic bugs from slipping through.
2021-06-02general: Replace RESULT_UNKNOWN with ResultUnknownMorph
Transition to PascalCase for result names.
2021-06-02general: Replace RESULT_SUCCESS with ResultSuccessMorph
Transition to PascalCase for result names.
2021-05-31common_funcs: Move R_ macros to result.hLioncash
These macros all interact with the result code type, so they should ideally be within this file as well, so all the common_funcs machinery doesn't need to be pulled in just to use them.
2021-05-16core: Make variable shadowing a compile-time errorLioncash
Now that we have most of core free of shadowing, we can enable the warning as an error to catch anything that may be remaining and also eliminate this class of logic bug entirely.
2020-12-03audio_core: Make shadowing and unused parameters errorsLioncash
Moves the audio code closer to enabling warnings as errors in general.
2020-08-14core: Resolve several -Wextra-semi warningsLioncash
We can amend one of the cascade macros to require semicolons in order to compile. In other cases, we can just remove the superfluous semicolons.
2019-11-12result: Add default error code for the ResultCode(-1) caseLioncash
Will be used to reduce the overall duplication of the same magic value all over the codebase in following changes.
2019-11-12result: Resolve sign-coversion warningsLioncash
The constructor was implicitly using signed->unsigned conversions to produce 0xFFFFFFFF. We can just specify this explicitly with UINT32_MAX.
2019-04-05hle/result: Remove unnecessary bitfield entry for ResultCodeLioncash
This is a hold over from the 3DS error codes in Citra.
2019-03-10core/hle/result: Remove now-unnecessary manually defined copy assignment ↵Lioncash
operator Previously this was required, as BitField wasn't trivially copyable. BitField has since been made trivially copyable, so now this isn't required anymore.
2019-03-10core/hle/result: Amend error in comment description for ResultCodeLioncash
Gets rid of another holdover from Citra, and describes the OS on the Switch instead.
2019-03-10core/hle/result: Remove now-unused constructor for ResultCodeLioncash
Now that the final stray ErrorDescription member was relocated, we can finally remove it and its relevant constructor in the ResultCode union.
2019-03-10core/hle/result: Relocate IPC error code to ipc_helpersLioncash
Relocates the error code to where it's most related, similar to how all the other error codes are. Previously we were including a non-generic error in the main result code header.
2019-03-05core/hle/ipc: Remove unnecessary includesLioncash
Removes a few inclusion dependencies from the headers or replaces existing ones with ones that don't indirectly include the required headers. This allows removing an inclusion of core/memory.h, meaning that if the memory header is ever changed in the future, it won't result in rebuilding the entirety of the HLE services (as the IPC headers are used quite ubiquitously throughout the HLE service implementations).
2018-11-16file_sys/errors: Extract FS-related error codes to file_sys/errors.hLioncash
Keeps filesystem-related error codes in one spot.
2018-08-28hle/result: Make ResultVal's move constructor as noexceptLioncash
Many containers within the standard library provide different behaviors based on whether or not a move constructor/assignment operator can be guaranteed not to throw or not. Notably, implementations will generally use std::move_if_noexcept (or an internal implementation of it) to provide strong exception guarantees. If a move constructor potentially throws (in other words, is not noexcept), then certain behaviors will create copies, rather than moving the values. For example, consider std::vector. When a std::vector calls resize(), there are two ways the elements can be relocated to the new block of memory (if a reallocation happens), by copy, or by moving the existing elements into the new block of memory. If a type does not have a guarantee that it will not throw in the move constructor, a copy will happen. However, if it can be guaranteed that the move constructor won't throw, then the elements will be moved. This just allows ResultVal to be moved instead of copied all the time if ever used in conjunction with containers for whatever reason.
2018-05-23Add & correct some error modulesgreggameplayer
2018-05-19Add and correct some Error Modules (#444)greggameplayer
* Add and correct some Error Modules
2018-03-28result: Check against self-assignment in ResultVal's copy assignment operatorLioncash
Avoids doing work that doesn't need to be done.
2018-02-27ResultCode: Mark any error code that isn't 0 as an error.Subv