int fflush(FILE *f) { if (f == NULL) { // flush all open streams for (f = &files->fd[0]; f < &files->fd[OPEN_MAX]; f++) if (filedesc_isopen(f)) fflush(f); return 0; } assert(filedesc_isopen(f)); return fileino_flush(f->ino); }
int fsync(int fn) { assert(filedesc_isopen(&files->fd[fn])); return fileino_flush(files->fd[fn].ino); }