From 0236fa7eeb392bb9ca8a89bd45ad508e3e0ac942 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 19 Nov 2016 18:22:49 +0000 Subject: [PATCH] regress: Wrap up fopen() too The fuzzer is going to want to wrap fopen. So add it to the special syscall list, and implement it with the obvious wrapper in hnonfuzz.c. No functional change. Signed-off-by: Ian Jackson --- regress/hnonfuzz.c | 2 ++ regress/hsyscalls.i4 | 2 ++ 2 files changed, 4 insertions(+) diff --git a/regress/hnonfuzz.c b/regress/hnonfuzz.c index 89876a9..e6fa2fa 100644 --- a/regress/hnonfuzz.c +++ b/regress/hnonfuzz.c @@ -27,6 +27,8 @@ #include "harness.h" +FILE *Hfopen(const char *path, const char *mode) { return fopen(path,mode); } + int Ttestinputfd(void) { const char *fdstr= getenv("ADNS_TEST_IN_FD"); if (!fdstr) return -1; diff --git a/regress/hsyscalls.i4 b/regress/hsyscalls.i4 index 68c769c..57270d8 100644 --- a/regress/hsyscalls.i4 +++ b/regress/hsyscalls.i4 @@ -141,3 +141,5 @@ hm_specsyscall(void*, malloc, `size_t sz') hm_specsyscall(void, free, `void *ptr') hm_specsyscall(void*, realloc, `void *op, size_t nsz') hm_specsyscall(void, exit, `int rv', NONRETURNING) + +hm_specsyscall(FILE*, fopen, `const char *path, const char *mode') -- 2.30.2