]> git.ozlabs.org Git - ccan/blobdiff - ccan/failtest/failtest.h
failtest: add comment about limitations of untracked pointers.
[ccan] / ccan / failtest / failtest.h
index 294c28b970066fda3b0e22fb3bf7ffe03140ad72..b304917bc6b0eece40039d6390f91c4020117811 100644 (file)
@@ -47,6 +47,7 @@ enum failtest_call_type {
        FAILTEST_READ,
        FAILTEST_WRITE,
        FAILTEST_FCNTL,
+       FAILTEST_MMAP,
 };
 
 struct calloc_call {
@@ -110,6 +111,16 @@ struct fcntl_call {
        } arg;
 };
 
+struct mmap_call {
+       void *ret;
+       void *addr;
+       size_t length;
+       int prot;
+       int flags;
+       int fd;
+       off_t offset;
+};
+
 /**
  * struct failtest_call - description of a call redirected to failtest module
  * @type: the call type
@@ -137,6 +148,9 @@ struct failtest_call {
        int error;
        /* How do we clean this up? */
        void (*cleanup)(void *u);
+       /* Backtrace of call chain. */
+       void **backtrace;
+       unsigned int backtrace_num;
        /* The actual call data. */
        union {
                struct calloc_call calloc;
@@ -148,6 +162,7 @@ struct failtest_call {
                struct read_call read;
                struct write_call write;
                struct fcntl_call fcntl;
+               struct mmap_call mmap;
        } u;
 };