fix(mkdir): 修复sys_mkdir逻辑错误和权限截断问题,并添加sys_umask #1419
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
新增:
sys_umask系统调用:修复:
do_mkdir_at权限模式截断问题:do_mkdir_at错误使用FileMode(通常用于 open flags)来接收权限参数的问题。ModeType接收参数,解决了因FileMode定义不包含中间权限位(Group/Other)导致传入的0777被错误截断为0703的 Bug。修复:
inode_permission权限位运算逻辑:(file_mode & ModeType::S_IRWXU.bits()) >> 6。修复:
mkdir边界条件与错误码(Test: MkdirAtEmptyPath / DirAlreadyExists):ENOENT。EEXIST,而非错误地返回成功或覆盖。修复:
sys_mknod行为:修复: 使用 ModeType 代替硬编码文件权限,如 0o777