new: devfs删除文件夹

This commit is contained in:
fslongjin
2022-09-12 23:56:31 +08:00
parent d60f1a8f80
commit 9f2b080cda
24 changed files with 366 additions and 92 deletions

View File

@ -58,7 +58,7 @@ static inline struct vfs_dir_entry_t *__devfs_find_dentry(struct vfs_dir_entry_t
static inline struct vfs_dir_entry_t *__devfs_find_dir(struct vfs_dir_entry_t *parent_dentry, const char *name)
{
struct vfs_dir_entry_t *target_dent = __devfs_find_dentry(parent_dentry, name);
if (target_dent->dir_inode->attribute & VFS_ATTR_DIR) // 名称相符且为目录则返回dentry
if (target_dent->dir_inode->attribute & VFS_IF_DIR) // 名称相符且为目录则返回dentry
return target_dent;
else
return NULL; // 否则直接返回空