aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/upas/fs/readdir.c
blob: 42028d4c1565a454ab4355dfe98a2274b4e13e0f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <u.h>
#include <libc.h>

void
main(void)
{
	Dir d;
	int fd, n;

	fd = open("/mail/fs", OREAD);
	while((n = dirread(fd, &d, sizeof(d))) > 0){
		print("%s\n", d.name);
	}
	print("n = %d\n", n);
}