diff options
author | Tom Rini <trini@konsulko.com> | 2025-04-03 16:54:59 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2025-04-03 16:54:59 -0600 |
commit | 1aa8b03c01f72cefee31039571f2de2f4ccfe0eb (patch) | |
tree | 06e5b9076311df8043ff67124427c1dee11e952c /boot/bootmeth_extlinux.c | |
parent | 1f2a3d066c99f57675162ce09586e9de30407f1b (diff) | |
parent | da8694a7d2cc9fdfd67e8a039ba1e70bdd543d0b (diff) |
Merge patch series "membuff: Add tests and update to support a flag for empty/full"
Simon Glass <sjg@chromium.org> says:
The membuff implementation curently has no tests. It also assumes that
head and tail can never correspond unless the buffer is empty.
This series provides a compile-time flag to support a 'full' flag. It
also adds some tests of the main routines.
The data structure is also renamed to membuf which fits better with
U-Boot.
There may be some cases in the code which could be optimised a little,
but the implementation is functional.
Link: https://lore.kernel.org/r/20250318152059.1464369-1-sjg@chromium.org
Diffstat (limited to 'boot/bootmeth_extlinux.c')
-rw-r--r-- | boot/bootmeth_extlinux.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/boot/bootmeth_extlinux.c b/boot/bootmeth_extlinux.c index 17c6cebd2f4..921d721a27b 100644 --- a/boot/bootmeth_extlinux.c +++ b/boot/bootmeth_extlinux.c @@ -108,15 +108,15 @@ static int extlinux_check(struct udevice *dev, struct bootflow_iter *iter) */ static int extlinux_fill_info(struct bootflow *bflow) { - struct membuff mb; + struct membuf mb; char line[200]; char *data; int len; log_debug("parsing bflow file size %x\n", bflow->size); - membuff_init(&mb, bflow->buf, bflow->size); - membuff_putraw(&mb, bflow->size, true, &data); - while (len = membuff_readline(&mb, line, sizeof(line) - 1, ' ', true), len) { + membuf_init(&mb, bflow->buf, bflow->size); + membuf_putraw(&mb, bflow->size, true, &data); + while (len = membuf_readline(&mb, line, sizeof(line) - 1, ' ', true), len) { char *tok, *p = line; tok = strsep(&p, " "); |