mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-12-10 05:38:49 +00:00
initial fs work (logging mostly)
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
#include "file_system.h"
|
||||
#include <debug.h>
|
||||
#include <Util/log.h>
|
||||
|
||||
namespace Emulator::HLE::Libraries::LibKernel::FileSystem {
|
||||
constexpr bool log_file_fs = true; // disable it to disable logging
|
||||
|
||||
int PS4_SYSV_ABI sceKernelOpen(const char* path, int flags, u16 mode) {
|
||||
LOG_INFO_IF(log_file_fs, "sceKernelOpen path = {} flags = {} mode = {}\n", path, log_hex_full(flags), log_hex_full(mode));
|
||||
return 0;
|
||||
}
|
||||
|
||||
} // namespace Emulator::HLE::Libraries::LibKernel::FileSystem
|
||||
@@ -0,0 +1,7 @@
|
||||
#pragma once
|
||||
#include <types.h>
|
||||
|
||||
namespace Emulator::HLE::Libraries::LibKernel::FileSystem {
|
||||
int PS4_SYSV_ABI sceKernelOpen(const char *path, int flags, /* SceKernelMode*/ u16 mode);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
#include "posix_file_system.h"
|
||||
|
||||
#include <debug.h>
|
||||
|
||||
#include "file_system.h"
|
||||
|
||||
namespace Emulator::HLE::Libraries::LibKernel::FileSystem::POSIX {
|
||||
int PS4_SYSV_ABI open(const char* path, int flags, /* SceKernelMode*/ u16 mode) {
|
||||
int result = sceKernelOpen(path, flags, mode);
|
||||
if (result < 0) {
|
||||
BREAKPOINT(); // posix calls different only for their return values
|
||||
}
|
||||
return result;
|
||||
}
|
||||
} // namespace Emulator::HLE::Libraries::LibKernel::FileSystem::POSIX
|
||||
@@ -0,0 +1,6 @@
|
||||
#pragma once
|
||||
#include "types.h"
|
||||
|
||||
namespace Emulator::HLE::Libraries::LibKernel::FileSystem::POSIX {
|
||||
int PS4_SYSV_ABI open(const char *path, int flags, /* SceKernelMode*/ u16 mode);
|
||||
}
|
||||
Reference in New Issue
Block a user