diff options
Diffstat (limited to 'include/tst_buffers.h')
-rw-r--r-- | include/tst_buffers.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/tst_buffers.h b/include/tst_buffers.h index d19ac8cf0..b5f355f0f 100644 --- a/include/tst_buffers.h +++ b/include/tst_buffers.h @@ -25,6 +25,11 @@ struct tst_buffers { * Array of iov buffer sizes terminated by -1. */ int *iov_sizes; + /* + * If size and iov_sizes is NULL this is the string we want to strdup() + * into the buffer. + */ + char *str; }; /* @@ -47,6 +52,12 @@ char *tst_strdup(const char *str); void *tst_alloc(size_t size); /* + * Printf into a guarded buffer. + */ +char *tst_aprintf(const char *fmt, ...) + __attribute__((format (printf, 1, 2))); + +/* * Allocates iovec structure including the buffers. * * @sizes -1 terminated array of buffer sizes. |