X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Ffailtest%2Ffailtest_override.h;h=236441fcfc78e74c6dd632308d5bed7eaf4f5223;hp=dd328b508a5433911888affaa0f4e73227fdd67c;hb=6c02fd599f5b3f925197c3161ee186a3305fc963;hpb=f0002cb9e4f6f403a25ad50252c06694439900f0 diff --git a/ccan/failtest/failtest_override.h b/ccan/failtest/failtest_override.h index dd328b50..236441fc 100644 --- a/ccan/failtest/failtest_override.h +++ b/ccan/failtest/failtest_override.h @@ -24,8 +24,8 @@ #include #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) \ @@ -39,9 +39,20 @@ #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) +#undef fcntl +#define fcntl(fd, ...) failtest_fcntl((fd), __FILE__, __LINE__, __VA_ARGS__) + #include #endif /* CCAN_FAILTEST_OVERRIDE_H */