[rpcsx-os] Initial sys_rename, sys_mkdir, sys_rmdir implementation

vfs: implement overlapped mounts
This commit is contained in:
DH 2023-10-29 12:30:37 +03:00
parent 3232e57445
commit 60e11486f4
8 changed files with 280 additions and 63 deletions

View file

@ -41,7 +41,8 @@ struct ProcessOps {
SysResult (*shm_open)(Thread *thread, const char *path, sint flags, sint mode,
Ref<File> *file);
SysResult (*mkdir)(Thread *thread, ptr<const char> path, sint mode);
SysResult (*rmdir)(Thread *thread, ptr<const char> path) = nullptr;
SysResult (*rmdir)(Thread *thread, ptr<const char> path);
SysResult (*rename)(Thread *thread, ptr<const char> from, ptr<const char> to);
SysResult (*blockpool_open)(Thread *thread, Ref<File> *file);
SysResult (*blockpool_map)(Thread *thread, caddr_t addr, size_t len,
sint prot, sint flags);

View file

@ -285,6 +285,9 @@ orbis::SysResult orbis::sys_freebsd6_truncate(Thread *thread, ptr<char> path,
orbis::SysResult orbis::sys_fsync(Thread *thread, sint fd) { return {}; }
orbis::SysResult orbis::sys_rename(Thread *thread, ptr<char> from,
ptr<char> to) {
if (auto rename = thread->tproc->ops->rename) {
return rename(thread, from, to);
}
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_renameat(Thread *thread, sint oldfd, ptr<char> old,