Furquan Shaikh has submitted this change. ( https://review.coreboot.org/c/coreboot/+/56987 )
Change subject: cbfstool: add buffer_end() to common.h ......................................................................
cbfstool: add buffer_end() to common.h
Add buffer_end() function to common.h. This function returns a pointer to the end of the buffer (exclusive).
This is needed by elogtool util. (See the next CL in the chain).
BUG=b:172210863
Change-Id: I380eecbc89c13f5fe5ab4c31d7a4fef97690a791 Signed-off-by: Ricardo Quesada ricardoq@google.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/56987 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Furquan Shaikh furquan@google.com --- M util/cbfstool/common.h 1 file changed, 5 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Furquan Shaikh: Looks good to me, approved
diff --git a/util/cbfstool/common.h b/util/cbfstool/common.h index 1c25a66..07ffdf8 100644 --- a/util/cbfstool/common.h +++ b/util/cbfstool/common.h @@ -54,6 +54,11 @@ return b->offset; }
+static inline void *buffer_end(const struct buffer *b) +{ + return b->data + b->size; +} + /* * Shrink a buffer toward the beginning of its previous space. * Afterward, buffer_delete() remains the means of cleaning it up. */