🆕 完成了ls的功能

This commit is contained in:
fslongjin
2022-05-29 14:36:46 +08:00
parent a4157bb4a7
commit 9ee6d33318
8 changed files with 106 additions and 16 deletions

11
kernel/common/dirent.h Normal file
View File

@ -0,0 +1,11 @@
#pragma once
#include <common/miniLibc/sys/types.h>
struct dirent
{
ino_t d_ino; // 文件序列号
off_t d_off; // dir偏移量
unsigned short d_reclen; // 目录下的记录数
unsigned char d_type; // entry的类型
char d_name[]; // 文件entry的名字是一个零长度的数组
};