mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-05 06:26:49 +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
|
|
@ -57,6 +57,10 @@ struct Process final {
|
|||
const ProcessOps *ops = nullptr;
|
||||
AppInfo appInfo{};
|
||||
AuthInfo authInfo{};
|
||||
kstring cwd;
|
||||
kstring root = "/";
|
||||
sint memoryContainer{1};
|
||||
bool isInSandbox = false;
|
||||
|
||||
std::uint64_t nextTlsSlot = 1;
|
||||
std::uint64_t lastTlsOffset = 0;
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ orbis::SysResult orbis::sys_regmgr_call(Thread *thread, uint32_t op,
|
|||
return uwrite((ptr<uint>)value, 0u);
|
||||
}
|
||||
|
||||
return{};
|
||||
return {};
|
||||
}
|
||||
|
||||
if (op == 4) {
|
||||
|
|
@ -1028,7 +1028,8 @@ orbis::SysResult orbis::sys_suspend_system(Thread *thread /* TODO */) {
|
|||
orbis::SysResult orbis::sys_ipmimgr_call(Thread *thread, uint op, uint kid,
|
||||
ptr<uint> result, ptr<void> params,
|
||||
uint64_t paramsSz) {
|
||||
// ORBIS_LOG_TODO(__FUNCTION__, thread->tid, op, kid, result, params, paramsSz);
|
||||
// ORBIS_LOG_TODO(__FUNCTION__, thread->tid, op, kid, result, params,
|
||||
// paramsSz);
|
||||
|
||||
switch (op) {
|
||||
case 0:
|
||||
|
|
|
|||
|
|
@ -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