#include #include int fs·open(char *path, fs·Directory *dir) { int fd, err; if((err=sys·open(path, sys·ORead|sys·ODirectory|sys·OCloseExec, 0, &fd))) return err; mem·set(dir, 0, sizeof(*dir)); dir->fd = fd; return 0; }