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 2025-03-24 16:51:36 +03:00 committed by GitHub
parent 16a68d78eb
commit 1908d26093
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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) {