diff options
author | Evan Benn <evanbenn@chromium.org> | 2022-11-14 10:31:22 +1100 |
---|---|---|
committer | Anastasia Klimchuk <aklm@chromium.org> | 2022-12-09 00:16:44 +0000 |
commit | da6d28f2d18c54cf88c2d6a4b098b1f1e15ac085 (patch) | |
tree | 764f32d139755503268905a3f8411981c93dd3da /tests/io_mock.h | |
parent | 67a393b88a96c03b7f7fd555de68e56d2de03e9e (diff) | |
download | flashrom-da6d28f2d18c54cf88c2d6a4b098b1f1e15ac085.tar.gz flashrom-da6d28f2d18c54cf88c2d6a4b098b1f1e15ac085.tar.bz2 flashrom-da6d28f2d18c54cf88c2d6a4b098b1f1e15ac085.zip |
tests: Add fwrite and fdopen to io_mock
BUG=None
BRANCH=None
TEST=None
Change-Id: I4dff96c264b3ada354538b434b2808fb66c7ef59
Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/69538
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'tests/io_mock.h')
-rw-r--r-- | tests/io_mock.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/io_mock.h b/tests/io_mock.h index 020794af..97980668 100644 --- a/tests/io_mock.h +++ b/tests/io_mock.h @@ -111,8 +111,10 @@ struct io_mock { FILE* (*iom_fopen)(void *state, const char *pathname, const char *mode); char* (*iom_fgets)(void *state, char *buf, int len, FILE *fp); size_t (*iom_fread)(void *state, void *buf, size_t size, size_t len, FILE *fp); + size_t (*iom_fwrite)(void *state, const void *buf, size_t size, size_t len, FILE *fp); int (*iom_fprintf)(void *state, FILE *fp, const char *fmt, va_list args); int (*iom_fclose)(void *state, FILE *fp); + FILE *(*iom_fdopen)(void *state, int fd, const char *mode); /* * An alternative to custom open mock. A test can either register its |