Home > Software engineering >  What is the use of stat.h in cat.c file of the xv6 os?
What is the use of stat.h in cat.c file of the xv6 os?

Time:12-20

What is the use of the stat.h header in cat.c?

Here you have the cat.c

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

Here you have the stat.h

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

I do not see any direct use of the stat struct in the cat.c so I wonder if there is an indirect one.

CodePudding user response:

It was added in this commit probably because user.h uses the struct stat * datatype

  •  Tags:  
  • c xv6
  • Related