diff options
| author | Raymond Mao <[email protected]> | 2024-02-03 08:36:21 -0800 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2024-02-29 09:24:22 -0500 |
| commit | 67254214930cd2cb52279b01690c1f820a7f83db (patch) | |
| tree | 66583957697b633a9f826a7d3a029ee84606f032 /include | |
| parent | 1c4751fd1ac7bda72ab72ce352dc9b2131df2807 (diff) | |
bloblist: check bloblist with specified buffer size
Instead of expecting the bloblist total size to be the same as the
pre-allocated buffer size, practically we are more interested in
whether the pre-allocated buffer size is bigger than the bloblist
total size.
Signed-off-by: Raymond Mao <[email protected]>
Reviewed-by: Ilias Apalodimas <[email protected]>
Diffstat (limited to 'include')
| -rw-r--r-- | include/bloblist.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/include/bloblist.h b/include/bloblist.h index f7e800f6812..cc78259e5a9 100644 --- a/include/bloblist.h +++ b/include/bloblist.h @@ -348,12 +348,13 @@ int bloblist_new(ulong addr, uint size, uint flags, uint align_log2); * bloblist_check() - Check if a bloblist exists * * @addr: Address of bloblist - * @size: Expected size of blobsize, or 0 to detect the size + * @size: Reserved space size for blobsize, or 0 to use the total size * Return: 0 if OK, -ENOENT if the magic number doesn't match (indicating that - * there problem is no bloblist at the given address), -EPROTONOSUPPORT + * there problem is no bloblist at the given address) or any fields for header + * size, used size and total size do not match, -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, -ENOSPC - * if the size is not large enough to hold the headers + * -EFBIG if the reserved space size is small than the total size or total size + * is 0 */ int bloblist_check(ulong addr, uint size); |
