shithub: 9ferno

ref: f38ffb2e9b569b388bfa44d08eab369509359ab7

View raw version
#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);
}