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>
This commit is contained in:
parent
83eb22e3b1
commit
ff236ef832
|
@ -54,6 +54,11 @@ static inline size_t buffer_offset(const struct buffer *b)
|
||||||
return b->offset;
|
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.
|
* Shrink a buffer toward the beginning of its previous space.
|
||||||
* Afterward, buffer_delete() remains the means of cleaning it up. */
|
* Afterward, buffer_delete() remains the means of cleaning it up. */
|
||||||
|
|
Loading…
Reference in New Issue