[Libs] Error Codes (#612)

* ngs2: all errors w/ official names

* ajm errors

* gnm errors

* random errors

* clang

* random error

* linux

---------

Co-authored-by: microsoftv <6063922+microsoftv@users.noreply.github.com>
This commit is contained in:
Lizardy 2024-08-27 08:53:38 -04:00 committed by GitHub
parent 288db9a0cf
commit 59b651be07
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 230 additions and 50 deletions

View file

@ -1,14 +1,16 @@
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include "random.h"
#include "random_error.h"
#include "common/logging/log.h"
#include "core/libraries/error_codes.h"
#include "core/libraries/libs.h"
#include "random.h"
namespace Libraries::Random {
s32 PS4_SYSV_ABI sceRandomGetRandomNumber(u8* buf, size_t size) {
s32 PS4_SYSV_ABI sceRandomGetRandomNumber(u8* buf, std::size_t size) {
LOG_TRACE(Lib_Random, "called");
if (size > SCE_RANDOM_MAX_SIZE) {
return SCE_RANDOM_ERROR_INVALID;