Skip to content

Commit

Permalink
Patch procf (#95)
Browse files Browse the repository at this point in the history
* debug color problem

Co-authored-by: longjin <[email protected]>
  • Loading branch information
Yuzizhou999 and fslongjin authored Nov 27, 2022
1 parent 6cb769c commit d65ade9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions kernel/src/filesystem/procfs/procfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ static long procfs_open(struct vfs_index_node_t *inode, struct vfs_file_t *file_
{
return 0;
}

struct procfs_inode_info_t *finode = inode->private_inode_info;
if (finode == NULL)
{
Expand Down Expand Up @@ -285,6 +286,8 @@ static long procfs_readdir(struct vfs_file_t *file_ptr, void *dirent, vfs_filldi
uint32_t dentry_type;
if (target_dent->dir_inode->attribute & VFS_IF_DIR)
dentry_type = VFS_IF_DIR;
else
dentry_type = VFS_IF_FILE;

return filler(dirent, file_ptr->position - 1, name, target_dent->name_length, dentry_type, file_ptr->position - 1);
failed:;
Expand Down

0 comments on commit d65ade9

Please sign in to comment.