mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-18 08:06:32 +00:00
feat(filesystem): 引入Umount系统调用 (#719)
* feat(filesystem): 引入Umount系统调用 * 将所有ENOSYS误用更正 * 修复了一个使同一个挂载点可以挂载2个文件系统的bug * 统一注释,增强程序稳定性,统一接口。注意:Umount时在fatfs的路径要使用大写,此受限于当前文件系统设计。
This commit is contained in:
@ -13,30 +13,30 @@
|
||||
pub trait ScmUiFramework: Sync + Send + Debug {
|
||||
// 安装ui框架的回调函数
|
||||
fn install(&self) -> Result<i32, SystemError> {
|
||||
return Err(SystemError::EOPNOTSUPP_OR_ENOTSUP);
|
||||
return Err(SystemError::ENOSYS);
|
||||
}
|
||||
// 卸载ui框架的回调函数
|
||||
fn uninstall(&self) -> Result<i32, SystemError> {
|
||||
return Err(SystemError::EOPNOTSUPP_OR_ENOTSUP);
|
||||
return Err(SystemError::ENOSYS);
|
||||
}
|
||||
// 启用ui框架的回调函数
|
||||
fn enable(&self) -> Result<i32, SystemError> {
|
||||
return Err(SystemError::EOPNOTSUPP_OR_ENOTSUP);
|
||||
return Err(SystemError::ENOSYS);
|
||||
}
|
||||
// 禁用ui框架的回调函数
|
||||
fn disable(&self) -> Result<i32, SystemError> {
|
||||
return Err(SystemError::EOPNOTSUPP_OR_ENOTSUP);
|
||||
return Err(SystemError::ENOSYS);
|
||||
}
|
||||
// 改变ui框架的帧缓冲区的回调函数
|
||||
fn change(&self, _buf: ScmBufferInfo) -> Result<i32, SystemError> {
|
||||
return Err(SystemError::EOPNOTSUPP_OR_ENOTSUP);
|
||||
return Err(SystemError::ENOSYS);
|
||||
}
|
||||
/// @brief 获取ScmUiFramework的元数据
|
||||
/// @return 成功:Ok(ScmUiFramework的元数据)
|
||||
/// 失败:Err(错误码)
|
||||
fn metadata(&self) -> Result<ScmUiFrameworkMetadata, SystemError> {
|
||||
// 若文件系统没有实现此方法,则返回“不支持”
|
||||
return Err(SystemError::EOPNOTSUPP_OR_ENOTSUP);
|
||||
return Err(SystemError::ENOSYS);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
Reference in New Issue
Block a user