#include <unistd.h>
#undef open
-#define open(pathname, flags, ...) \
- failtest_open((pathname), (flags), __FILE__, __LINE__, __VA_ARGS__)
+#define open(pathname, ...) \
+ failtest_open((pathname), __FILE__, __LINE__, __VA_ARGS__)
#undef pipe
#define pipe(pipefd) \
#define write(fd, buf, count) \
failtest_write((fd), (buf), (count), __FILE__, __LINE__)
+#undef pread
+#define pread(fd, buf, count, off) \
+ failtest_pread((fd), (buf), (count), (off), __FILE__, __LINE__)
+
+#undef pwrite
+#define pwrite(fd, buf, count, off) \
+ failtest_pwrite((fd), (buf), (count), (off), __FILE__, __LINE__)
+
#undef close
#define close(fd) failtest_close(fd)