From 63e669c0cfa79246c0201eac0d546c2324e19d68 Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Tue, 7 Jan 2020 21:54:21 +0300 Subject: [PATCH] sys_fs: fix sys_fs_fget_block_size Return flags via last argument. --- rpcs3/Emu/Cell/lv2/sys_fs.cpp | 6 +++--- rpcs3/Emu/Cell/lv2/sys_fs.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rpcs3/Emu/Cell/lv2/sys_fs.cpp b/rpcs3/Emu/Cell/lv2/sys_fs.cpp index c6204a26a7..cf4d947dc9 100644 --- a/rpcs3/Emu/Cell/lv2/sys_fs.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_fs.cpp @@ -1507,9 +1507,9 @@ error_code sys_fs_fsync(ppu_thread& ppu, u32 fd) return CELL_OK; } -error_code sys_fs_fget_block_size(ppu_thread& ppu, u32 fd, vm::ptr sector_size, vm::ptr block_size, vm::ptr arg4, vm::ptr arg5) +error_code sys_fs_fget_block_size(ppu_thread& ppu, u32 fd, vm::ptr sector_size, vm::ptr block_size, vm::ptr arg4, vm::ptr out_flags) { - sys_fs.warning("sys_fs_fget_block_size(fd=%d, sector_size=*0x%x, block_size=*0x%x, arg4=*0x%x, arg5=*0x%x)", fd, sector_size, block_size, arg4, arg5); + sys_fs.warning("sys_fs_fget_block_size(fd=%d, sector_size=*0x%x, block_size=*0x%x, arg4=*0x%x, out_flags=*0x%x)", fd, sector_size, block_size, arg4, out_flags); const auto file = idm::get(fd); @@ -1522,7 +1522,7 @@ error_code sys_fs_fget_block_size(ppu_thread& ppu, u32 fd, vm::ptr sector_s *sector_size = 4096; *block_size = 4096; *arg4 = 0; - *arg5 = file->mode; + *out_flags = file->flags; return CELL_OK; } diff --git a/rpcs3/Emu/Cell/lv2/sys_fs.h b/rpcs3/Emu/Cell/lv2/sys_fs.h index 0794203e72..d1f4823231 100644 --- a/rpcs3/Emu/Cell/lv2/sys_fs.h +++ b/rpcs3/Emu/Cell/lv2/sys_fs.h @@ -381,7 +381,7 @@ error_code sys_fs_fcntl(ppu_thread& ppu, u32 fd, u32 op, vm::ptr arg, u32 error_code sys_fs_lseek(ppu_thread& ppu, u32 fd, s64 offset, s32 whence, vm::ptr pos); error_code sys_fs_fdatasync(ppu_thread& ppu, u32 fd); error_code sys_fs_fsync(ppu_thread& ppu, u32 fd); -error_code sys_fs_fget_block_size(ppu_thread& ppu, u32 fd, vm::ptr sector_size, vm::ptr block_size, vm::ptr arg4, vm::ptr arg5); +error_code sys_fs_fget_block_size(ppu_thread& ppu, u32 fd, vm::ptr sector_size, vm::ptr block_size, vm::ptr arg4, vm::ptr out_flags); error_code sys_fs_get_block_size(ppu_thread& ppu, vm::cptr path, vm::ptr sector_size, vm::ptr block_size, vm::ptr arg4); error_code sys_fs_truncate(ppu_thread& ppu, vm::cptr path, u64 size); error_code sys_fs_ftruncate(ppu_thread& ppu, u32 fd, u64 size);