mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-20 22:05:12 +00:00
[orbis-kernel] implement sys_chdir & sys_chroot
This commit is contained in:
parent
d814b2b741
commit
05b7861999
4 changed files with 52 additions and 21 deletions
|
|
@ -1,6 +1,7 @@
|
|||
#include "stat.hpp"
|
||||
#include "sys/sysproto.hpp"
|
||||
#include "utils/Logs.hpp"
|
||||
#include <filesystem>
|
||||
|
||||
orbis::SysResult orbis::sys_sync(Thread *thread) { return ErrorCode::NOSYS; }
|
||||
orbis::SysResult orbis::sys_quotactl(Thread *thread, ptr<char> path, sint cmd,
|
||||
|
|
@ -23,10 +24,14 @@ orbis::SysResult orbis::sys_fchdir(Thread *thread, sint fd) {
|
|||
return ErrorCode::NOSYS;
|
||||
}
|
||||
orbis::SysResult orbis::sys_chdir(Thread *thread, ptr<char> path) {
|
||||
return ErrorCode::NOSYS;
|
||||
ORBIS_LOG_WARNING(__FUNCTION__, path);
|
||||
thread->tproc->cwd = std::filesystem::path(path).lexically_normal().string();
|
||||
return {};
|
||||
}
|
||||
orbis::SysResult orbis::sys_chroot(Thread *thread, ptr<char> path) {
|
||||
return ErrorCode::NOSYS;
|
||||
ORBIS_LOG_WARNING(__FUNCTION__, path);
|
||||
thread->tproc->root = path;
|
||||
return {};
|
||||
}
|
||||
orbis::SysResult orbis::sys_open(Thread *thread, ptr<char> path, sint flags,
|
||||
sint mode) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue