mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-22 19:33:26 +00:00
feat(filesystem): 引入Umount系统调用 (#719)
* feat(filesystem): 引入Umount系统调用 * 将所有ENOSYS误用更正 * 修复了一个使同一个挂载点可以挂载2个文件系统的bug * 统一注释,增强程序稳定性,统一接口。注意:Umount时在fatfs的路径要使用大写,此受限于当前文件系统设计。
This commit is contained in:
@ -250,13 +250,13 @@ impl Syscall {
|
||||
// 暂时不支持除匿名页以外的映射
|
||||
if !map_flags.contains(MapFlags::MAP_ANONYMOUS) {
|
||||
kerror!("mmap: not support file mapping");
|
||||
return Err(SystemError::EOPNOTSUPP_OR_ENOTSUP);
|
||||
return Err(SystemError::ENOSYS);
|
||||
}
|
||||
|
||||
// 暂时不支持巨页映射
|
||||
if map_flags.contains(MapFlags::MAP_HUGETLB) {
|
||||
kerror!("mmap: not support huge page mapping");
|
||||
return Err(SystemError::EOPNOTSUPP_OR_ENOTSUP);
|
||||
return Err(SystemError::ENOSYS);
|
||||
}
|
||||
let current_address_space = AddressSpace::current()?;
|
||||
let start_page = current_address_space.write().map_anonymous(
|
||||
|
@ -779,7 +779,7 @@ impl UserMappings {
|
||||
|
||||
if flags.contains(MapFlags::MAP_FIXED) {
|
||||
// todo: 支持MAP_FIXED标志对已有的VMA进行覆盖
|
||||
return Err(SystemError::EOPNOTSUPP_OR_ENOTSUP);
|
||||
return Err(SystemError::ENOSYS);
|
||||
}
|
||||
|
||||
// 如果没有指定MAP_FIXED标志,那么就对地址做修正
|
||||
|
Reference in New Issue
Block a user