mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-23 20:05:01 +00:00
partial implementation of _write function , which is used as debug ouput from lle libc
This commit is contained in:
parent
8fa5874fb1
commit
0525481a9b
6 changed files with 41 additions and 6 deletions
|
@ -2,6 +2,7 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
// Generated By moduleGenerator
|
||||
#include <common/assert.h>
|
||||
#include "common/logging/log.h"
|
||||
#include "error_codes.h"
|
||||
#include "libkernel.h"
|
||||
|
@ -458,8 +459,13 @@ int PS4_SYSV_ABI _wait4() {
|
|||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
int PS4_SYSV_ABI _write() {
|
||||
LOG_ERROR(Kernel, "(STUBBED) called");
|
||||
s64 PS4_SYSV_ABI _write(int d, const void* buf, std::size_t nbytes) {
|
||||
if (d <= 2) { // stdin,stdout,stderr
|
||||
LOG_INFO(Kernel, "{}", (const char*)buf);
|
||||
return nbytes;
|
||||
}
|
||||
LOG_ERROR(Kernel, "(STUBBED) called d = {} nbytes = {} ", d, nbytes);
|
||||
UNREACHABLE(); // normal write , is it a posix call??
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
|
@ -5253,7 +5259,7 @@ int PS4_SYSV_ABI sceCoredumpDebugTriggerCoredump() {
|
|||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
void Registerlibkernel(Core::Loader::SymbolsResolver* sym){
|
||||
void Registerlibkernel(Core::Loader::SymbolsResolver* sym) {
|
||||
/* LIB_FUNCTION("Fjc4-n1+y2g", "libkernel", 1, "libkernel", 1, 1, __elf_phdr_match_addr);
|
||||
LIB_FUNCTION("9BcDykPmo1I", "libkernel", 1, "libkernel", 1, 1, __error);
|
||||
LIB_FUNCTION("nSSPVGJLMjE", "libkernel", 1, "libkernel", 1, 1, __freeze);
|
||||
|
@ -5348,9 +5354,9 @@ void Registerlibkernel(Core::Loader::SymbolsResolver* sym){
|
|||
LIB_FUNCTION("6xVpy0Fdq+I", "libkernel", 1, "libkernel", 1, 1, _sigprocmask);
|
||||
LIB_FUNCTION("9zpLsLESzTs", "libkernel", 1, "libkernel", 1, 1, _sigsuspend);
|
||||
LIB_FUNCTION("04AjkP0jO9U", "libkernel", 1, "libkernel", 1, 1, _umtx_op);
|
||||
LIB_FUNCTION("RFlsu7nfopM", "libkernel", 1, "libkernel", 1, 1, _wait4);
|
||||
LIB_FUNCTION("RFlsu7nfopM", "libkernel", 1, "libkernel", 1, 1, _wait4);*/
|
||||
LIB_FUNCTION("FxVZqBAA7ks", "libkernel", 1, "libkernel", 1, 1, _write);
|
||||
LIB_FUNCTION("YSHRBRLn2pI", "libkernel", 1, "libkernel", 1, 1, _writev);
|
||||
/* LIB_FUNCTION("YSHRBRLn2pI", "libkernel", 1, "libkernel", 1, 1, _writev);
|
||||
LIB_FUNCTION("3e+4Iv7IJ8U", "libkernel", 1, "libkernel", 1, 1, accept);
|
||||
LIB_FUNCTION("8vE6Z6VEYyk", "libkernel", 1, "libkernel", 1, 1, access);
|
||||
LIB_FUNCTION("3SVaehJvYFk", "libkernel", 1, "libkernel", 1, 1, amd64_set_fsbase);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue