aboutsummaryrefslogtreecommitdiff
path: root/include/membuff.h
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2024-01-11 10:03:51 -0500
committerTom Rini <trini@konsulko.com>2024-01-11 10:03:51 -0500
commitd3dba8a28bb7f57a4558c944f9c329c467144633 (patch)
tree517ec69555b6f0f1dafd0f114ec67c7b9ddbcdf0 /include/membuff.h
parent7a59d520ef0bfd29b339cba5282149271d5ac3b2 (diff)
parent6c2f753f4ad3dcee60190949d1286736a6d51d17 (diff)
Merge tag 'u-boot-dfu-20240111' of https://source.denx.de/u-boot/custodians/u-boot-dfu
u-boot-dfu-20240111 - Implement fastboot multi-response. This allows multi-line response and most importantly, finally adds support for fastboot getvar all command. - New 'fastboot oem console' command. Useful for debugging to send data the u-boot shell via fastboot - Console recording fixes
Diffstat (limited to 'include/membuff.h')
-rw-r--r--include/membuff.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/membuff.h b/include/membuff.h
index 21051b0c54..4eba626ce1 100644
--- a/include/membuff.h
+++ b/include/membuff.h
@@ -192,10 +192,11 @@ int membuff_free(struct membuff *mb);
* @mb: membuff to adjust
* @str: Place to put the line
* @maxlen: Maximum line length (excluding terminator)
+ * @must_fit: If true then str is empty if line doesn't fit
* Return: number of bytes read (including terminator) if a line has been
- * read, 0 if nothing was there
+ * read, 0 if nothing was there or line didn't fit when must_fit is set
*/
-int membuff_readline(struct membuff *mb, char *str, int maxlen, int minch);
+int membuff_readline(struct membuff *mb, char *str, int maxlen, int minch, bool must_fit);
/**
* membuff_extend_by() - expand a membuff