xv6 os 的 cat.c 文件中的 stat.h 有什么用?

What is the use of stat.h in cat.c file of the xv6 os?

cat.c中的stat.hheader有什么用?

这里有 cat.c

https://github.com/mit-pdos/xv6-riscv/blob/riscv/user/cat.c

这里有 stat.h

https://github.com/mit-pdos/xv6-riscv/blob/riscv/kernel/stat.h

我没有看到在 cat.c 中直接使用 stat 结构,所以我想知道是否有间接的。

它是在 this commit probably because user.h 中添加的,使用 struct stat * 数据类型