TakefiveInteractive / TedkOS

Operating System - ECE 391 Takefive Interactive Team
GNU General Public License v2.0
96 stars 17 forks source link

Implement fstat #13

Closed tengyifei closed 8 years ago

tengyifei commented 8 years ago

Status of an open file. For consistency with other minimal implementations in these examples, all files are regarded as character special devices. The sys/stat.h header file required is distributed in the include subdirectory for the newlib C library.

#include <sys/stat.h>
int fstat(int file, struct stat *st) {
    st->st_mode = S_IFCHR;
    return 0;
}
tengyifei commented 8 years ago

Mostly implemented by 91a63f3112bc9dbce582806d2d38953104a31870