[orbis-kernel] stub more syscalls

This commit is contained in:
DH 2023-09-03 22:26:20 +03:00
parent 89b7dcd497
commit a952642ea9
4 changed files with 12 additions and 5 deletions

View file

@ -1,4 +1,5 @@
#include "sys/sysproto.hpp"
#include "utils/Logs.hpp"
orbis::SysResult orbis::sys_getpid(Thread *thread) {
thread->retval[0] = thread->tid;
@ -20,7 +21,10 @@ orbis::SysResult orbis::sys_getgroups(Thread *thread, uint gidsetsize,
ptr<gid_t> gidset) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_setsid(Thread *thread) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_setsid(Thread *thread) {
ORBIS_LOG_WARNING(__FUNCTION__);
return {};
}
orbis::SysResult orbis::sys_setpgid(Thread *thread, sint pid, sint pgid) {
return ErrorCode::NOSYS;
}
@ -73,5 +77,6 @@ orbis::SysResult orbis::sys_getlogin(Thread *thread, ptr<char> namebuf,
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_setlogin(Thread *thread, ptr<char> namebuf) {
return ErrorCode::NOSYS;
ORBIS_LOG_WARNING(__FUNCTION__, namebuf);
return {};
}

View file

@ -830,7 +830,7 @@ orbis::SysResult orbis::sys_mdbg_service(Thread *thread, uint32_t op,
}
orbis::SysResult orbis::sys_randomized_path(Thread *thread /* TODO */) {
std::printf("TODO: sys_randomized_path()\n");
return ErrorCode::NOSYS;
return {};
}
orbis::SysResult orbis::sys_rdup(Thread *thread /* TODO */) {
return ErrorCode::NOSYS;

View file

@ -358,7 +358,8 @@ orbis::SysResult orbis::sys_umask(Thread *thread, sint newmask) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_revoke(Thread *thread, ptr<char> path) {
return ErrorCode::NOSYS;
ORBIS_LOG_WARNING(__FUNCTION__);
return {};
}
orbis::SysResult orbis::sys_lgetfh(Thread *thread, ptr<char> fname,
ptr<struct fhandle> fhp) {

View file

@ -522,7 +522,8 @@ SysResult thr_wake(orbis::Thread *thread, orbis::slong id) {
}
SysResult thr_set_name(orbis::Thread *thread, orbis::slong id,
orbis::ptr<const char> name) {
return ErrorCode::NOTSUP;
ORBIS_LOG_WARNING(__FUNCTION__, name, id, thread->tid);
return {};
}
orbis::SysResult exit(orbis::Thread *thread, orbis::sint status) {
std::printf("Requested exit with status %d\n", status);