diff --git a/src/core/file_sys/fs.cpp b/src/core/file_sys/fs.cpp index 69bcbe47..173649bd 100644 --- a/src/core/file_sys/fs.cpp +++ b/src/core/file_sys/fs.cpp @@ -12,7 +12,7 @@ void MntPoints::mount(const std::string& host_folder, const std::string& guest_f m_mnt_pairs.push_back(pair); } -void MntPoints::unmount(const std::string& path) {}//TODO! +void MntPoints::unmount(const std::string& path) {} // TODO! void MntPoints::unmountAll() { std::unique_lock lock{m_mutex}; m_mnt_pairs.clear(); @@ -33,4 +33,8 @@ std::string MntPoints::getHostDirectory(const std::string& guest_directory) { } return ""; } +int HandleTable::createHandle() { return 0; } +void HandleTable::deleteHandle(int d) {} +File* HandleTable::getFile(int d) { return nullptr; } +File* HandleTable::getFile(const std::string& real_name) { return nullptr; } } // namespace Core::FileSys \ No newline at end of file diff --git a/src/core/file_sys/fs.h b/src/core/file_sys/fs.h index 912d9825..4073036d 100644 --- a/src/core/file_sys/fs.h +++ b/src/core/file_sys/fs.h @@ -24,4 +24,18 @@ class MntPoints { std::mutex m_mutex; }; +struct File {}; +class HandleTable { + HandleTable() {} + virtual ~HandleTable() {} + int createHandle(); + void deleteHandle(int d); + File* getFile(int d); + File* getFile(const std::string& real_name); + + private: + std::vector m_files; + std::mutex m_mutex; +}; + } // namespace Core::FileSys \ No newline at end of file diff --git a/src/core/hle/libraries/libkernel/file_system.cpp b/src/core/hle/libraries/libkernel/file_system.cpp index bc3ba4d7..c1fd0ee6 100644 --- a/src/core/hle/libraries/libkernel/file_system.cpp +++ b/src/core/hle/libraries/libkernel/file_system.cpp @@ -12,7 +12,7 @@ int PS4_SYSV_ABI sceKernelOpen(const char* path, int flags, u16 mode) { return 0; } -int PS4_SYSV_ABI open(const char* path, int flags, /* SceKernelMode*/ u16 mode) { +int PS4_SYSV_ABI posix_open(const char* path, int flags, /* SceKernelMode*/ u16 mode) { LOG_INFO_IF(log_file_fs, "posix open redirect to sceKernelOpen\n"); int result = sceKernelOpen(path, flags, mode); if (result < 0) { @@ -23,7 +23,7 @@ int PS4_SYSV_ABI open(const char* path, int flags, /* SceKernelMode*/ u16 mode) void fileSystemSymbolsRegister(SymbolsResolver* sym) { LIB_FUNCTION("1G3lF1Gg1k8", "libkernel", 1, "libkernel", 1, 1, sceKernelOpen); - LIB_FUNCTION("wuCroIGjt2g", "libScePosix", 1, "libkernel", 1, 1, open); + LIB_FUNCTION("wuCroIGjt2g", "libScePosix", 1, "libkernel", 1, 1, posix_open); } } // namespace Core::Libraries::LibKernel \ No newline at end of file diff --git a/src/core/hle/libraries/libkernel/file_system.h b/src/core/hle/libraries/libkernel/file_system.h index 36c973aa..35128b3d 100644 --- a/src/core/hle/libraries/libkernel/file_system.h +++ b/src/core/hle/libraries/libkernel/file_system.h @@ -6,7 +6,7 @@ namespace Core::Libraries::LibKernel { int PS4_SYSV_ABI sceKernelOpen(const char *path, int flags, /* SceKernelMode*/ u16 mode); // posix file system -int PS4_SYSV_ABI open(const char *path, int flags, /* SceKernelMode*/ u16 mode); +int PS4_SYSV_ABI posix_open(const char *path, int flags, /* SceKernelMode*/ u16 mode); void fileSystemSymbolsRegister(SymbolsResolver *sym);