X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=include%2Fbloblist.h;h=609ac421d668368f58771b5de54f486d83bd4031;hb=406df85345f942d9348443983d81a01e013e920b;hp=85144010abea9e00edf67fddf288373e8f0303fc;hpb=93e72ac472b537bb4b0c6a97a7e6aab2b37860c6;p=oweals%2Fu-boot.git diff --git a/include/bloblist.h b/include/bloblist.h index 85144010ab..609ac421d6 100644 --- a/include/bloblist.h +++ b/include/bloblist.h @@ -151,6 +151,19 @@ int bloblist_ensure_size(uint tag, int size, void **blobp); */ void *bloblist_ensure(uint tag, int size); +/** + * bloblist_ensure_size_ret() - Find or add a blob + * + * Find an existing blob, or add a new one if not found + * + * @tag: Tag to add (enum bloblist_tag_t) + * @sizep: Size of the blob to create; returns size of actual blob + * @blobp: Returns a pointer to blob on success + * @return 0 if OK, -ENOSPC if it is missing and could not be added due to lack + * of space + */ +int bloblist_ensure_size_ret(uint tag, int *sizep, void **blobp); + /** * bloblist_new() - Create a new, empty bloblist of a given size * @@ -170,7 +183,8 @@ int bloblist_new(ulong addr, uint size, uint flags); * @return 0 if OK, -ENOENT if the magic number doesn't match (indicating that * there problem is no bloblist at the given address), -EPROTONOSUPPORT * if the version does not match, -EIO if the checksum does not match, - * -EFBIG if the expected size does not match the detected size + * -EFBIG if the expected size does not match the detected size, -ENOSPC + * if the size is not large enough to hold the headers */ int bloblist_check(ulong addr, uint size);