summaryrefslogtreecommitdiff
path: root/lib
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 /lib
parent7a59d520ef0bfd29b339cba5282149271d5ac3b2 (diff)
parent6c2f753f4ad3dcee60190949d1286736a6d51d17 (diff)
downloadu-boot-d3dba8a28bb7f57a4558c944f9c329c467144633.tar.gz
u-boot-d3dba8a28bb7f57a4558c944f9c329c467144633.tar.bz2
u-boot-d3dba8a28bb7f57a4558c944f9c329c467144633.zip
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 'lib')
-rw-r--r--lib/membuff.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/membuff.c b/lib/membuff.c
index 3c6c0ae125..b242a38ff1 100644
--- a/lib/membuff.c
+++ b/lib/membuff.c
@@ -287,7 +287,7 @@ int membuff_free(struct membuff *mb)
(mb->end - mb->start) - 1 - membuff_avail(mb);
}
-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)
{
int len; /* number of bytes read (!= string length) */
char *s, *end;
@@ -309,7 +309,7 @@ int membuff_readline(struct membuff *mb, char *str, int maxlen, int minch)
}
/* couldn't get the whole string */
- if (!ok) {
+ if (!ok && must_fit) {
if (maxlen)
*orig = '\0';
return 0;