实现了sys_rename (#578)

* 基本实现了rename的系统调用

* 实现相对路径的mv

* confilct resolve

* make fmt

* 更改校验位置,
 增加了SYS_RENAMEAT与SYS_RENAMEAT2两个系统调用,其实现与SYS_RENAME基本一致

* 删除了fat中的link

* fix

* 修改注释格式,删除管道文件判断

* 1
This commit is contained in:
TTaq
2024-03-18 14:47:59 +08:00
committed by GitHub
parent c3c7344451
commit 9e481b3bfe
10 changed files with 255 additions and 8 deletions

View File

@ -195,7 +195,7 @@ impl IndexNode for KernFSInode {
return Err(SystemError::EOPNOTSUPP_OR_ENOTSUP);
}
fn move_(
fn move_to(
&self,
_old_name: &str,
_target: &Arc<dyn IndexNode>,
@ -366,6 +366,11 @@ impl IndexNode for KernFSInode {
.unwrap()
.write(callback_data, &buf[..len], offset);
}
fn rename(&self, _old_name: &str, _new_name: &str) -> Result<(), SystemError> {
// 待实现
Err(SystemError::ENOSYS)
}
}
impl KernFSInode {