Ricardo Quesada has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/56987 )
Change subject: cbfstool: add buffer_get() to common.h ......................................................................
cbfstool: add buffer_get() to common.h
Add buffer_get() function to common.h. This function returns a pointer to the end of the buffer.
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 --- M util/cbfstool/common.h 1 file changed, 5 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/87/56987/1
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. */