diff options
| author | forsyth <forsyth@vitanuova.com> | 2010-05-03 23:52:10 +0100 |
|---|---|---|
| committer | forsyth <forsyth@vitanuova.com> | 2010-05-03 23:52:10 +0100 |
| commit | 5fa9f9468e71b4a1125dd7c209fd5ab9a37ab1e2 (patch) | |
| tree | a86cb06d8812aa13da7f13a782f94eebc87c84e1 /lib9/pread-Nt.c | |
| parent | 773d7fd206e9623edfb12cd182dc5a115ec86950 (diff) | |
20100503-2352
Diffstat (limited to 'lib9/pread-Nt.c')
| -rw-r--r-- | lib9/pread-Nt.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib9/pread-Nt.c b/lib9/pread-Nt.c new file mode 100644 index 00000000..94fc81d5 --- /dev/null +++ b/lib9/pread-Nt.c @@ -0,0 +1,9 @@ +#include "lib9.h" + +long +pread(int fd, void *buf, long n, vlong offset) +{ + if(seek(fd, offset, 0) < 0) + return -1; + return read(fd, buf, n); +} |
