lseek: let the host OS set lseek errors (#2370)

* 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 authored and GitHub committed 2025-03-24 15:51:36 +02:00
1 parent 16a68d78eb
commit 1908d26093
2 files changed
+1 -14

No files matched your search

@@ -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) {