X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Ffailtest%2Ffailtest.c;h=dae3024ef97f55c24be4169a6589e7ef01258373;hp=104628352dd580a61e22bb5ff0743b35e0267ad5;hb=e18e80fe175422d26efe689addc0f67bdba0e097;hpb=3ea7b4d695237414015f33674d6ba01009e77fd1 diff --git a/ccan/failtest/failtest.c b/ccan/failtest/failtest.c index 10462835..dae3024e 100644 --- a/ccan/failtest/failtest.c +++ b/ccan/failtest/failtest.c @@ -1177,6 +1177,15 @@ void *failtest_mmap(void *addr, size_t length, int prot, int flags, return p->u.mmap.ret; } +/* Since OpenBSD can't handle adding args, we use this file and line. + * This will make all mmaps look the same, reducing coverage. */ +void *failtest_mmap_noloc(void *addr, size_t length, int prot, int flags, + int fd, off_t offset) +{ + return failtest_mmap(addr, length, prot, flags, fd, offset, + __FILE__, __LINE__); +} + static void cleanup_pipe(struct pipe_call *call, bool restore) { trace("cleaning up pipe fd=%i%s,%i%s\n",