blob: 698ac7126231d79153a6603d0ac8b981d80afded (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#include <u.h>
#include <base.h>
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;
}
|