From 5fa9f9468e71b4a1125dd7c209fd5ab9a37ab1e2 Mon Sep 17 00:00:00 2001 From: forsyth Date: Mon, 3 May 2010 23:52:10 +0100 Subject: 20100503-2352 --- lib9/pread-Nt.c | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 lib9/pread-Nt.c (limited to 'lib9/pread-Nt.c') 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); +} -- cgit v1.2.3