mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-06 00:59:18 +00:00
cellFs fixes
cellFsAllocateFileAreaWithoutZeroFill implemented
This commit is contained in:
parent
e8d76ede14
commit
b1e8eefad0
File diff suppressed because it is too large
Load Diff
@ -791,7 +791,7 @@ error_code sys_fs_fcntl(u32 fd, u32 op, vm::ptr<void> _arg, u32 _size)
|
||||
break;
|
||||
}
|
||||
|
||||
case 0xe0000001: // Unknown
|
||||
case 0xe0000001: // Unknown (cellFsStat)
|
||||
{
|
||||
break;
|
||||
}
|
||||
@ -930,7 +930,15 @@ error_code sys_fs_fcntl(u32 fd, u32 op, vm::ptr<void> _arg, u32 _size)
|
||||
|
||||
case 0xe0000017: // cellFsAllocateFileAreaWithoutZeroFill
|
||||
{
|
||||
break;
|
||||
const auto arg = vm::static_ptr_cast<lv2_file_e0000017>(_arg);
|
||||
|
||||
if (_size < arg->size || arg->_x4 != 0x10 || arg->_x8 != 0x20)
|
||||
{
|
||||
return CELL_EINVAL;
|
||||
}
|
||||
|
||||
arg->out_code = sys_fs_truncate(arg->file_path, arg->file_size);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
case 0xe0000018: // cellFsChangeFileSizeWithoutAllocation
|
||||
|
@ -310,7 +310,7 @@ struct lv2_file_c0000002 : lv2_file_op
|
||||
|
||||
CHECK_SIZE(lv2_file_c0000002, 0x28);
|
||||
|
||||
// sys_fs_fnctl: unknown (called before cellFsOpen, for example)
|
||||
// sys_fs_fcntl: unknown (called before cellFsOpen, for example)
|
||||
struct lv2_file_c0000006 : lv2_file_op
|
||||
{
|
||||
be_t<u32> size; // 0x20
|
||||
@ -325,6 +325,20 @@ struct lv2_file_c0000006 : lv2_file_op
|
||||
|
||||
CHECK_SIZE(lv2_file_c0000006, 0x20);
|
||||
|
||||
// sys_fs_fcntl: cellFsAllocateFileAreaWithoutZeroFill
|
||||
struct lv2_file_e0000017 : lv2_file_op
|
||||
{
|
||||
be_t<u32> size; // 0x28
|
||||
be_t<u32> _x4; // 0x10, offset
|
||||
be_t<u32> _x8; // 0x20, offset
|
||||
be_t<u32> _xc; // -
|
||||
vm::ps3::bcptr<char> file_path;
|
||||
be_t<u64> file_size;
|
||||
be_t<u32> out_code;
|
||||
};
|
||||
|
||||
CHECK_SIZE(lv2_file_e0000017, 0x28);
|
||||
|
||||
// Syscalls
|
||||
|
||||
error_code sys_fs_test(u32 arg1, u32 arg2, vm::ps3::ptr<u32> arg3, u32 arg4, vm::ps3::ptr<char> buf, u32 buf_size);
|
||||
|
@ -277,7 +277,7 @@ void KernelExplorer::Update()
|
||||
idm::select<lv2_fs_object>([&](u32 id, lv2_fs_object& fo)
|
||||
{
|
||||
lv2_types.back().count++;
|
||||
m_tree->AppendItem(lv2_types.back().node, fmt::format("FD: ID = 0x%08x '%s'", id));
|
||||
m_tree->AppendItem(lv2_types.back().node, fmt::format("FD: ID = 0x%08x '%s'", id, fo.name.data()));
|
||||
});
|
||||
|
||||
for (auto&& entry : lv2_types)
|
||||
|
Loading…
Reference in New Issue
Block a user