if( _SysFInfo(fd, &info, 0) != 0 )
return NULL;
-
-
- return NULL;
+ DIR *ret = malloc(sizeof(DIR));
+ ret->fd = fd;
+ ret->pos = 0;
+ return ret;
}
DIR *opendir(const char *name)
errno = EINVAL;
return -1;
}
+ _SysClose(dp->fd);
+ free(dp);
return 0;
}
int mkdir(const char *pathname, mode_t mode)
{
- _SysDebug("TODO: POSIX mkdir(%i, 0%o)", pathname, mode);
- return -1;
+ _SysDebug("TODO: POSIX mkdir('%s', 0%o)", pathname, mode);
+ _SysMkDir(pathname);
+ return 0;
}
char *getpass(const char *prompt)