X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Ffailtest%2Ffailtest.h;h=21bc9f7c59e342fd12dec4140314b252d364763c;hb=e8f0484b7808efe03dbb573563b336d533487e29;hp=e8bf10ab5f6c46e056833610fd8c57b54bb1e3d5;hpb=1605358b20327a8d384750cc2f840ed3a2ea224f;p=ccan diff --git a/ccan/failtest/failtest.h b/ccan/failtest/failtest.h index e8bf10ab..21bc9f7c 100644 --- a/ccan/failtest/failtest.h +++ b/ccan/failtest/failtest.h @@ -64,19 +64,21 @@ struct open_call { const char *pathname; int flags; mode_t mode; + int dup_fd; }; struct pipe_call { int ret; int fds[2]; + bool closed[2]; }; struct read_call { ssize_t ret; + off_t off; int fd; void *buf; size_t count; - off_t off; }; struct write_call { @@ -85,6 +87,10 @@ struct write_call { const void *buf; size_t count; off_t off; + off_t old_filelen; + off_t saved_len; + void *saved_contents; + int dup_fd; }; struct fcntl_call { @@ -121,6 +127,8 @@ struct failtest_call { bool fail; /* What we set errno to. */ int error; + /* How do we clean this up? */ + void (*cleanup)(void *u); /* The actual call data. */ union { struct calloc_call calloc;