mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-08 16:05:56 +00:00
[orbis-kernel] Implement basic sys_socketex
Implement sys_socketclose
This commit is contained in:
parent
cea6052e54
commit
76db5849a0
8 changed files with 74 additions and 8 deletions
|
|
@ -16,6 +16,7 @@ orbis::SysResult orbis::sys_fcntl(Thread *thread, sint fd, sint cmd,
|
|||
return ErrorCode::NOSYS;
|
||||
}
|
||||
orbis::SysResult orbis::sys_close(Thread *thread, sint fd) {
|
||||
ORBIS_LOG_NOTICE(__FUNCTION__, fd);
|
||||
if (auto close = thread->tproc->ops->close) {
|
||||
return close(thread, fd);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ orbis::SysResult orbis::sys_freebsd6_ftruncate(Thread *thread, sint fd, sint,
|
|||
}
|
||||
orbis::SysResult orbis::sys_ioctl(Thread *thread, sint fd, ulong com,
|
||||
caddr_t data) {
|
||||
ORBIS_LOG_WARNING(__FUNCTION__, fd, com);
|
||||
if (auto ioctl = thread->tproc->ops->ioctl) {
|
||||
return ioctl(thread, fd, com, data);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,10 +22,20 @@ orbis::SysResult orbis::sys_netgetsockinfo(Thread *thread /* TODO */) {
|
|||
}
|
||||
orbis::SysResult orbis::sys_socketex(Thread *thread, ptr<const char> name,
|
||||
sint domain, sint type, sint protocol) {
|
||||
return {};
|
||||
ORBIS_LOG_TODO(__FUNCTION__, name, domain, type, protocol);
|
||||
if (auto socket = thread->tproc->ops->socket) {
|
||||
return socket(thread, name, domain, type, protocol);
|
||||
}
|
||||
return ErrorCode::NOSYS;
|
||||
}
|
||||
orbis::SysResult orbis::sys_socketclose(Thread *thread /* TODO */) {
|
||||
return {};
|
||||
orbis::SysResult orbis::sys_socketclose(Thread *thread, sint fd) {
|
||||
// This syscall is identical to sys_close
|
||||
ORBIS_LOG_NOTICE(__FUNCTION__, fd);
|
||||
if (auto close = thread->tproc->ops->close) {
|
||||
return close(thread, fd);
|
||||
}
|
||||
|
||||
return ErrorCode::NOSYS;
|
||||
}
|
||||
orbis::SysResult orbis::sys_netgetiflist(Thread *thread /* TODO */) {
|
||||
return ErrorCode::NOSYS;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue