From fa225b60fc26fc59bf3a6101d9f1b5aba0cf8f8b Mon Sep 17 00:00:00 2001 From: georgemoralis Date: Mon, 10 Jun 2024 18:56:10 +0300 Subject: [PATCH] changed some spamming to trace --- src/core/libraries/kernel/file_system.cpp | 6 +++--- src/core/libraries/kernel/thread_management.cpp | 4 ++-- src/emulator.cpp | 2 ++ 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/core/libraries/kernel/file_system.cpp b/src/core/libraries/kernel/file_system.cpp index 5f6fb33a..336a541a 100644 --- a/src/core/libraries/kernel/file_system.cpp +++ b/src/core/libraries/kernel/file_system.cpp @@ -90,6 +90,9 @@ int PS4_SYSV_ABI sceKernelClose(int d) { } size_t PS4_SYSV_ABI sceKernelWrite(int d, void* buf, size_t nbytes) { + if (buf == nullptr) { + return SCE_KERNEL_ERROR_EFAULT; + } if (d <= 2) { // stdin,stdout,stderr char* str = strdup((const char*)buf); if (str[nbytes - 1] == '\n') @@ -98,9 +101,6 @@ size_t PS4_SYSV_ABI sceKernelWrite(int d, void* buf, size_t nbytes) { free(str); return nbytes; } - if (buf == nullptr) { - return SCE_KERNEL_ERROR_EFAULT; - } auto* h = Common::Singleton::Instance(); auto* file = h->GetFile(d); if (file == nullptr) { diff --git a/src/core/libraries/kernel/thread_management.cpp b/src/core/libraries/kernel/thread_management.cpp index 0e5aff3c..721b5c03 100644 --- a/src/core/libraries/kernel/thread_management.cpp +++ b/src/core/libraries/kernel/thread_management.cpp @@ -549,7 +549,7 @@ int PS4_SYSV_ABI scePthreadMutexUnlock(ScePthreadMutex* mutex) { int result = pthread_mutex_unlock(&(*mutex)->pth_mutex); if (result != 0) { - LOG_INFO(Kernel_Pthread, "name={}, result={}", (*mutex)->name, result); + LOG_TRACE(Kernel_Pthread, "name={}, result={}", (*mutex)->name, result); } switch (result) { case 0: @@ -1133,7 +1133,7 @@ int PS4_SYSV_ABI scePthreadMutexTrylock(ScePthreadMutex* mutex) { int result = pthread_mutex_trylock(&(*mutex)->pth_mutex); if (result != 0) { - LOG_INFO(Kernel_Pthread, "name={}, result={}", (*mutex)->name, result); + LOG_TRACE(Kernel_Pthread, "name={}, result={}", (*mutex)->name, result); } switch (result) { case 0: diff --git a/src/emulator.cpp b/src/emulator.cpp index dd8de3a7..c528cb89 100644 --- a/src/emulator.cpp +++ b/src/emulator.cpp @@ -102,6 +102,8 @@ void Emulator::Run(const std::filesystem::path& file) { found = true; LOG_INFO(Loader, "Loading {}", entry.path().string().c_str()); linker->LoadModule(entry.path()); + } else { + LOG_ERROR(Loader, "Skipped loading module {}", entry.path().string().c_str()); } } }