diff options
author | Simon Glass <sjg@chromium.org> | 2023-08-14 16:40:22 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-08-25 13:54:33 -0400 |
commit | 34ecba1f7616b388ee28490e8a3ed43fb1463011 (patch) | |
tree | d2c174f76f0afe9055d7e03daefac4b810407424 /include/abuf.h | |
parent | 633b3dc75536a7a878126c41babc248c095b66fe (diff) | |
download | u-boot-34ecba1f7616b388ee28490e8a3ed43fb1463011.zip u-boot-34ecba1f7616b388ee28490e8a3ed43fb1463011.tar.gz u-boot-34ecba1f7616b388ee28490e8a3ed43fb1463011.tar.bz2 |
abuf: Allow incrementing the size
Provide a convenience function to increment the size of the abuf.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/abuf.h')
-rw-r--r-- | include/abuf.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/abuf.h b/include/abuf.h index 9badda6..be98ec7 100644 --- a/include/abuf.h +++ b/include/abuf.h @@ -91,6 +91,15 @@ void abuf_map_sysmem(struct abuf *abuf, ulong addr, size_t size); bool abuf_realloc(struct abuf *abuf, size_t new_size); /** + * abuf_realloc_inc() - Increment abuf size by a given amount + * + * @abuf: abuf to adjust + * @inc: Size incrmement to use (the buffer size will be increased by this much) + * Return: true if OK, false if out of memory + */ +bool abuf_realloc_inc(struct abuf *abuf, size_t inc); + +/** * abuf_uninit_move() - Return the allocated contents and uninit the abuf * * This returns the abuf data to the caller, allocating it if necessary, so that |