|
|
1.1 root 1: /*
2: * read directories, research-style
3: * uses dirread system call, which does just what we want
4: */
5:
6: #include <rf.h>
7: #include "zarf.h"
8:
9: long lseek();
10:
11: dodirread(f, buf, size, off, offp)
12: register Rfile *f;
13: char *buf;
14: int size;
15: long off;
16: long *offp;
17: {
18: extern int errno;
19: int n;
20:
21: lseek(fsp(f)->fd, off, 0);
22: if ((n = dirread(fsp(f)->fd, buf, size)) < 0)
23: fserrno = errno;
24: else
25: *offp = lseek(fsp(f)->fd, 0L, 1);
26: return (n);
27: }
28:
29: dodircleanup(f)
30: Rfile *f;
31: {
32: /* nothing to do */
33: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.