Skip to content

Commit

Permalink
LinuxEmulation: Oops, messed up the function signature on the new v6.…
Browse files Browse the repository at this point in the history
…13 impls
  • Loading branch information
Sonicadvance1 committed Jan 22, 2025
1 parent ac1b6d9 commit 7f91ea5
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions Source/Tools/LinuxEmulation/LinuxSyscalls/Syscalls/FS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,25 +127,29 @@ void RegisterFS(FEX::HLE::SyscallHandler* Handler) {
SYSCALL_ERRNO();
});
if (Handler->IsHostKernelVersionAtLeast(6, 13, 0)) {
REGISTER_SYSCALL_IMPL(setxattrat,
[](FEXCore::Core::CpuStateFrame* Frame, int dfd, const char* pathname, uint32_t at_flags, const char* name,
const FileManager::xattr_args* uargs, size_t usize) -> uint64_t {
uint64_t Result = FEX::HLE::_SyscallHandler->FM.SetxattrAt(dfd, pathname, at_flags, name, uargs, usize);
SYSCALL_ERRNO();
});
REGISTER_SYSCALL_IMPL(getxattrat,
[](FEXCore::Core::CpuStateFrame* Frame, int dfd, const char* pathname, uint32_t at_flags, const char* name,
const FileManager::xattr_args* uargs, size_t usize) -> uint64_t {
uint64_t Result = FEX::HLE::_SyscallHandler->FM.GetxattrAt(dfd, pathname, at_flags, name, uargs, usize);
SYSCALL_ERRNO();
});

REGISTER_SYSCALL_IMPL(
setxattrat, [](int dfd, const char* pathname, uint32_t at_flags, const char* name, const FileManager::xattr_args* uargs, size_t usize) -> uint64_t {
uint64_t Result = FEX::HLE::_SyscallHandler->FM.SetxattrAt(dfd, pathname, at_flags, name, uargs, usize);
listxattrat, [](FEXCore::Core::CpuStateFrame* Frame, int dfd, const char* pathname, uint32_t at_flags, char* list, size_t size) -> uint64_t {
uint64_t Result = FEX::HLE::_SyscallHandler->FM.ListxattrAt(dfd, pathname, at_flags, list, size);
SYSCALL_ERRNO();
});
REGISTER_SYSCALL_IMPL(
getxattrat, [](int dfd, const char* pathname, uint32_t at_flags, const char* name, const FileManager::xattr_args* uargs, size_t usize) -> uint64_t {
uint64_t Result = FEX::HLE::_SyscallHandler->FM.GetxattrAt(dfd, pathname, at_flags, name, uargs, usize);
removexattrat, [](FEXCore::Core::CpuStateFrame* Frame, int dfd, const char* pathname, uint32_t at_flags, const char* name) -> uint64_t {
uint64_t Result = FEX::HLE::_SyscallHandler->FM.RemovexattrAt(dfd, pathname, at_flags, name);
SYSCALL_ERRNO();
});

REGISTER_SYSCALL_IMPL(listxattrat, [](int dfd, const char* pathname, uint32_t at_flags, char* list, size_t size) -> uint64_t {
uint64_t Result = FEX::HLE::_SyscallHandler->FM.ListxattrAt(dfd, pathname, at_flags, list, size);
SYSCALL_ERRNO();
});
REGISTER_SYSCALL_IMPL(removexattrat, [](int dfd, const char* pathname, uint32_t at_flags, const char* name) -> uint64_t {
uint64_t Result = FEX::HLE::_SyscallHandler->FM.RemovexattrAt(dfd, pathname, at_flags, name);
SYSCALL_ERRNO();
});
} else {
REGISTER_SYSCALL_IMPL(setxattrat, UnimplementedSyscallSafe);
REGISTER_SYSCALL_IMPL(getxattrat, UnimplementedSyscallSafe);
Expand Down

0 comments on commit 7f91ea5

Please sign in to comment.