mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 19:11:53 +00:00
abuf: Provide a constant buffer
Add a new initialiser which can accept a constant pointer. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
d887432807
commit
7ba7c1dd86
3 changed files with 41 additions and 0 deletions
|
@ -119,6 +119,12 @@ void abuf_init_set(struct abuf *abuf, void *data, size_t size)
|
|||
abuf_set(abuf, data, size);
|
||||
}
|
||||
|
||||
void abuf_init_const(struct abuf *abuf, const void *data, size_t size)
|
||||
{
|
||||
/* for now there is no flag indicating that the abuf data is constant */
|
||||
abuf_init_set(abuf, (void *)data, size);
|
||||
}
|
||||
|
||||
void abuf_init_move(struct abuf *abuf, void *data, size_t size)
|
||||
{
|
||||
abuf_init_set(abuf, data, size);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue