mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-18 00:54:23 -04:00
Integrate new result macros. (#1780)
* result: try out some experimental shenanigans * result: sketch out some more shenanigans * result: see what it looks like to convert kernel to use result conds instead of guards * make rest of kernel use experimental new macro-ing
This commit is contained in:
parent
375ba615be
commit
96f95b9f95
109 changed files with 1355 additions and 1380 deletions
|
@ -681,13 +681,10 @@ namespace ams::ldr {
|
|||
/* Load NSOs into process memory. */
|
||||
{
|
||||
/* Ensure we close the process handle, if we fail. */
|
||||
auto process_guard = SCOPE_GUARD { os::CloseNativeHandle(info.process_handle); };
|
||||
ON_RESULT_FAILURE { os::CloseNativeHandle(info.process_handle); }
|
||||
|
||||
/* Load all NSOs. */
|
||||
R_TRY(LoadAutoLoadModules(std::addressof(info), g_nso_headers, g_has_nso, argument));
|
||||
|
||||
/* We don't need to close the process handle, since we succeeded. */
|
||||
process_guard.Cancel();
|
||||
}
|
||||
|
||||
/* Register NSOs with the RoManager. */
|
||||
|
@ -722,7 +719,7 @@ namespace ams::ldr {
|
|||
/* Move the process handle to output. */
|
||||
*out = info.process_handle;
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result GetProgramInfo(ProgramInfo *out, cfg::OverrideStatus *out_status, const ncm::ProgramLocation &loc, const char *path) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue