lseek: let the host OS set lseek errors (#2370)
Some checks failed
Update Translation / Update Translation (push) Has been skipped
Build and Release / reuse (push) Has been cancelled
Build and Release / clang-format (push) Has been cancelled
Build and Release / get-info (push) Has been cancelled
Build and Release / windows-sdl (push) Has been cancelled
Build and Release / windows-qt (push) Has been cancelled
Build and Release / macos-sdl (push) Has been cancelled
Build and Release / macos-qt (push) Has been cancelled
Build and Release / linux-sdl (push) Has been cancelled
Build and Release / linux-qt (push) Has been cancelled
Build and Release / linux-sdl-gcc (push) Has been cancelled
Build and Release / linux-qt-gcc (push) Has been cancelled
Build and Release / pre-release (push) Has been cancelled

* Fix lseek(fd, -1, SEEK_SET) for XNA

* be sure, if seek really return error

* refactoring

* let host os set lseek errors
This commit is contained in:
mailwl
2025-03-24 16:51:36 +03:00
committed by GitHub
parent 16a68d78eb
commit 1908d26093
2 changed files with 1 additions and 14 deletions

View File

@@ -289,6 +289,7 @@ size_t PS4_SYSV_ABI _writev(int fd, const SceKernelIovec* iov, int iovcn) {
}
s64 PS4_SYSV_ABI sceKernelLseek(int d, s64 offset, int whence) {
LOG_TRACE(Kernel_Fs, "called: offset {} whence {}", offset, whence);
auto* h = Common::Singleton<Core::FileSys::HandleTable>::Instance();
auto* file = h->GetFile(d);
if (file == nullptr) {