Open ycsin opened 10 months ago
I would like to work on this.
Any advice?
@DanTGL - we probably need some ZVFS implementation of this (in fdtable.h) and a feof() wrapper in the common libc.
@DanTGL - we probably need some ZVFS implementation of this (in fdtable.h) and a feof() wrapper in the common libc.
Ok, so the feof function in the common libc just calls the ZVFS implementation directly. How should the file descriptor and the end-of-file indicator be handled?
I'm guessing that the end-of-file indicator is stored in the fd_entry?
This was originally added as a ticket under POSIX, but
feof()
is not a POSIX function. It is from C89.https://en.cppreference.com/w/c/io/feof
The expectation from the POSIX API is that this function is implemented as part of whatever C library is in use.