failtest: capture pread/pwrite
[ccan] / ccan / failtest / failtest_override.h
index 90d1bfdc48a9f07064e323522b6687d25c24957e..236441fcfc78e74c6dd632308d5bed7eaf4f5223 100644 (file)
@@ -24,8 +24,8 @@
 #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)