Stub sys_fs syscalls

This commit is contained in:
Nekotekina 2017-05-10 17:43:04 +03:00
parent 75017345be
commit 8df95dbe39
3 changed files with 111 additions and 15 deletions

View File

@ -730,32 +730,32 @@ const std::array<ppu_function_t, 1024> s_ppu_syscall_table
BIND_FUNC(sys_fs_closedir), //807 (0x327)
BIND_FUNC(sys_fs_stat), //808 (0x328)
BIND_FUNC(sys_fs_fstat), //809 (0x329)
null_func,//BIND_FUNC(sys_fs_link), //810 (0x32A)
BIND_FUNC(sys_fs_link), //810 (0x32A)
BIND_FUNC(sys_fs_mkdir), //811 (0x32B)
BIND_FUNC(sys_fs_rename), //812 (0x32C)
BIND_FUNC(sys_fs_rmdir), //813 (0x32D)
BIND_FUNC(sys_fs_unlink), //814 (0x32E)
BIND_FUNC(sys_fs_utime), //815 (0x32F)
null_func,//BIND_FUNC(sys_fs_access), //816 (0x330)
BIND_FUNC(sys_fs_access), //816 (0x330)
BIND_FUNC(sys_fs_fcntl), //817 (0x331)
BIND_FUNC(sys_fs_lseek), //818 (0x332)
BIND_FUNC(sys_fs_fdatasync), //819 (0x333)
BIND_FUNC(sys_fs_fsync), //820 (0x334)
BIND_FUNC(sys_fs_fget_block_size), //821 (0x335)
BIND_FUNC(sys_fs_get_block_size), //822 (0x336)
null_func,//BIND_FUNC(sys_fs_acl_read), //823 (0x337)
null_func,//BIND_FUNC(sys_fs_acl_write), //824 (0x338)
BIND_FUNC(sys_fs_acl_read), //823 (0x337)
BIND_FUNC(sys_fs_acl_write), //824 (0x338)
BIND_FUNC(sys_fs_lsn_get_cda_size), //825 (0x339)
null_func,//BIND_FUNC(sys_fs_lsn_get_cda), //826 (0x33A)
BIND_FUNC(sys_fs_lsn_get_cda), //826 (0x33A)
BIND_FUNC(sys_fs_lsn_lock), //827 (0x33B)
BIND_FUNC(sys_fs_lsn_unlock), //828 (0x33C)
null_func,//BIND_FUNC(sys_fs_lsn_read), //829 (0x33D)
null_func,//BIND_FUNC(sys_fs_lsn_write), //830 (0x33E)
BIND_FUNC(sys_fs_lsn_read), //829 (0x33D)
BIND_FUNC(sys_fs_lsn_write), //830 (0x33E)
BIND_FUNC(sys_fs_truncate), //831 (0x33F)
BIND_FUNC(sys_fs_ftruncate), //832 (0x340)
null_func,//BIND_FUNC(sys_fs_symbolic_link), //833 (0x341)
BIND_FUNC(sys_fs_symbolic_link), //833 (0x341)
BIND_FUNC(sys_fs_chmod), //834 (0x342)
null_func,//BIND_FUNC(sys_fs_chown), //835 (0x343)
BIND_FUNC(sys_fs_chown), //835 (0x343)
null_func,//BIND_FUNC(sys_fs_newfs), //836 (0x344)
null_func,//BIND_FUNC(sys_fs_mount), //837 (0x345)
null_func,//BIND_FUNC(sys_fs_unmount), //838 (0x346)
@ -765,9 +765,9 @@ const std::array<ppu_function_t, 1024> s_ppu_syscall_table
null_func,//BIND_FUNC(sys_fs_get_mount_info), //842 (0x34A)
null_func,//BIND_FUNC(sys_fs_get_fs_info_size), //843 (0x34B)
null_func,//BIND_FUNC(sys_fs_get_fs_info), //844 (0x34C)
null_func,//BIND_FUNC(sys_fs_mapped_allocate), //845 (0x34D)
null_func,//BIND_FUNC(sys_fs_mapped_free), //846 (0x34E)
null_func,//BIND_FUNC(sys_fs_truncate2), //847 (0x34F)
BIND_FUNC(sys_fs_mapped_allocate), //845 (0x34D)
BIND_FUNC(sys_fs_mapped_free), //846 (0x34E)
BIND_FUNC(sys_fs_truncate2), //847 (0x34F)
null_func, null_func, //849 UNS
null_func, null_func, null_func, null_func, null_func, //854 UNS
@ -783,9 +783,9 @@ const std::array<ppu_function_t, 1024> s_ppu_syscall_table
null_func,//BIND_FUNC(sys_...) //867 ROOT
null_func,//BIND_FUNC(sys_...) //868 ROOT / DBG AUTHID
null_func,//BIND_FUNC(sys_...) //869 ROOT
BIND_FUNC(sys_ss_get_console_id), //870 (0x366)
BIND_FUNC(sys_ss_get_console_id), //870 (0x366)
null_func,//BIND_FUNC(sys_ss_access_control_engine), //871 (0x367) DBG
BIND_FUNC(sys_ss_get_open_psid), //872 (0x368)
BIND_FUNC(sys_ss_get_open_psid), //872 (0x368)
null_func,//BIND_FUNC(sys_ss_get_cache_of_product_mode), //873 (0x369)
null_func,//BIND_FUNC(sys_ss_get_cache_of_flash_ext_flag), //874 (0x36A)
null_func,//BIND_FUNC(sys_ss_get_boot_device) //875 (0x36B)

View File

@ -557,6 +557,13 @@ error_code sys_fs_fstat(u32 fd, vm::ptr<CellFsStat> sb)
return CELL_OK;
}
error_code sys_fs_link(vm::cptr<char> from, vm::cptr<char> to)
{
sys_fs.todo("sys_fs_link(from=%s, to=%s)", from, to);
return CELL_OK;
}
error_code sys_fs_mkdir(vm::cptr<char> path, s32 mode)
{
sys_fs.warning("sys_fs_mkdir(path=%s, mode=%#o)", path, mode);
@ -628,6 +635,13 @@ error_code sys_fs_unlink(vm::cptr<char> path)
return CELL_OK;
}
error_code sys_fs_access(vm::ps3::cptr<char> path, s32 mode)
{
sys_fs.todo("sys_fs_access(path=%s, mode=%#o)", path, mode);
return CELL_OK;
}
error_code sys_fs_fcntl(u32 fd, u32 op, vm::ptr<void> _arg, u32 _size)
{
sys_fs.trace("sys_fs_fcntl(fd=%d, op=0x%x, arg=*0x%x, size=0x%x)", fd, op, _arg, _size);
@ -1131,9 +1145,23 @@ error_code sys_fs_ftruncate(u32 fd, u64 size)
return CELL_OK;
}
error_code sys_fs_symbolic_link(vm::cptr<char> target, vm::cptr<char> linkpath)
{
sys_fs.todo("sys_fs_symbolic_link(target=%s, linkpath=%s)", target, linkpath);
return CELL_OK;
}
error_code sys_fs_chmod(vm::cptr<char> path, s32 mode)
{
sys_fs.todo("sys_fs_chmod(path=%s, mode=%#o) -> CELL_OK", path, mode);
sys_fs.todo("sys_fs_chmod(path=%s, mode=%#o)", path, mode);
return CELL_OK;
}
error_code sys_fs_chown(vm::cptr<char> path, s32 uid, s32 gid)
{
sys_fs.todo("sys_fs_chown(path=%s, uid=%d, gid=%d)", path, uid, gid);
return CELL_OK;
}
@ -1156,6 +1184,20 @@ error_code sys_fs_utime(vm::ps3::cptr<char> path, vm::ps3::cptr<CellFsUtimbuf> t
return CELL_OK;
}
error_code sys_fs_acl_read(vm::ps3::cptr<char> path, vm::ps3::ptr<void> ptr)
{
sys_fs.todo("sys_fs_acl_read(path=%s, ptr=*0x%x)", path, ptr);
return CELL_OK;
}
error_code sys_fs_acl_write(vm::ps3::cptr<char> path, vm::ps3::ptr<void> ptr)
{
sys_fs.todo("sys_fs_acl_write(path=%s, ptr=*0x%x)", path, ptr);
return CELL_OK;
}
error_code sys_fs_lsn_get_cda_size(u32 fd, vm::ps3::ptr<u64> ptr)
{
sys_fs.warning("sys_fs_lsn_get_cda_size(fd=%d, ptr=*0x%x)", fd, ptr);
@ -1172,6 +1214,13 @@ error_code sys_fs_lsn_get_cda_size(u32 fd, vm::ps3::ptr<u64> ptr)
return CELL_OK;
}
error_code sys_fs_lsn_get_cda(u32 fd, vm::ps3::ptr<void> arg2, u64 arg3, vm::ps3::ptr<u64> arg4)
{
sys_fs.todo("sys_fs_lsn_get_cda(fd=%d, arg2=*0x%x, arg3=0x%x, arg4=*0x%x)", fd, arg2, arg3, arg4);
return CELL_OK;
}
error_code sys_fs_lsn_lock(u32 fd)
{
sys_fs.trace("sys_fs_lsn_lock(fd=%d)", fd);
@ -1211,3 +1260,38 @@ error_code sys_fs_lsn_unlock(u32 fd)
return CELL_OK;
}
error_code sys_fs_lsn_read(u32 fd, vm::ps3::cptr<void> ptr, u64 size)
{
sys_fs.todo("sys_fs_lsn_read(fd=%d, ptr=*0x%x, size=0x%x)", fd, ptr, size);
return CELL_OK;
}
error_code sys_fs_lsn_write(u32 fd, vm::ps3::cptr<void> ptr, u64 size)
{
sys_fs.todo("sys_fs_lsn_write(fd=%d, ptr=*0x%x, size=0x%x)", fd, ptr, size);
return CELL_OK;
}
error_code sys_fs_mapped_allocate(u32 fd, u64 size, vm::ps3::pptr<void> out_ptr)
{
sys_fs.todo("sys_fs_mapped_allocate(fd=%d, arg2=0x%x, out_ptr=**0x%x)", fd, size, out_ptr);
return CELL_OK;
}
error_code sys_fs_mapped_free(u32 fd, vm::ps3::ptr<void> ptr)
{
sys_fs.todo("sys_fs_mapped_free(fd=%d, ptr=0x%#x)", fd, ptr);
return CELL_OK;
}
error_code sys_fs_truncate2(u32 fd, u64 size)
{
sys_fs.todo("sys_fs_truncate2(fd=%d, size=0x%x)", fd, size);
return CELL_OK;
}

View File

@ -351,10 +351,12 @@ error_code sys_fs_readdir(u32 fd, vm::ps3::ptr<CellFsDirent> dir, vm::ps3::ptr<u
error_code sys_fs_closedir(u32 fd);
error_code sys_fs_stat(vm::ps3::cptr<char> path, vm::ps3::ptr<CellFsStat> sb);
error_code sys_fs_fstat(u32 fd, vm::ps3::ptr<CellFsStat> sb);
error_code sys_fs_link(vm::ps3::cptr<char> from, vm::ps3::cptr<char> to);
error_code sys_fs_mkdir(vm::ps3::cptr<char> path, s32 mode);
error_code sys_fs_rename(vm::ps3::cptr<char> from, vm::ps3::cptr<char> to);
error_code sys_fs_rmdir(vm::ps3::cptr<char> path);
error_code sys_fs_unlink(vm::ps3::cptr<char> path);
error_code sys_fs_access(vm::ps3::cptr<char> path, s32 mode);
error_code sys_fs_fcntl(u32 fd, u32 op, vm::ps3::ptr<void> arg, u32 size);
error_code sys_fs_lseek(u32 fd, s64 offset, s32 whence, vm::ps3::ptr<u64> pos);
error_code sys_fs_fdatasync(u32 fd);
@ -363,8 +365,18 @@ error_code sys_fs_fget_block_size(u32 fd, vm::ps3::ptr<u64> sector_size, vm::ps3
error_code sys_fs_get_block_size(vm::ps3::cptr<char> path, vm::ps3::ptr<u64> sector_size, vm::ps3::ptr<u64> block_size, vm::ps3::ptr<u64> arg4);
error_code sys_fs_truncate(vm::ps3::cptr<char> path, u64 size);
error_code sys_fs_ftruncate(u32 fd, u64 size);
error_code sys_fs_symbolic_link(vm::ps3::cptr<char> target, vm::ps3::cptr<char> linkpath);
error_code sys_fs_chmod(vm::ps3::cptr<char> path, s32 mode);
error_code sys_fs_chown(vm::ps3::cptr<char> path, s32 uid, s32 gid);
error_code sys_fs_utime(vm::ps3::cptr<char> path, vm::ps3::cptr<CellFsUtimbuf> timep);
error_code sys_fs_acl_read(vm::ps3::cptr<char> path, vm::ps3::ptr<void>);
error_code sys_fs_acl_write(vm::ps3::cptr<char> path, vm::ps3::ptr<void>);
error_code sys_fs_lsn_get_cda_size(u32 fd, vm::ps3::ptr<u64> ptr);
error_code sys_fs_lsn_get_cda(u32 fd, vm::ps3::ptr<void>, u64, vm::ps3::ptr<u64>);
error_code sys_fs_lsn_lock(u32 fd);
error_code sys_fs_lsn_unlock(u32 fd);
error_code sys_fs_lsn_read(u32 fd, vm::ps3::cptr<void>, u64);
error_code sys_fs_lsn_write(u32 fd, vm::ps3::cptr<void>, u64);
error_code sys_fs_mapped_allocate(u32 fd, u64, vm::ps3::pptr<void> out_ptr);
error_code sys_fs_mapped_free(u32 fd, vm::ps3::ptr<void> ptr);
error_code sys_fs_truncate2(u32 fd, u64 size);