mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-28 18:11:33 +00:00
netconsole: support packets longer than 512 bytes
Esp. while printing the environment the output is usually longer than 512 bytes. Instead of cutting the message, send multiple 512 bytes packets. Signed-off-by: Michael Walle <michael@walle.cc> Acked-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
parent
ca366d0e38
commit
1a9845b4f0
1 changed files with 7 additions and 4 deletions
|
@ -189,10 +189,13 @@ static void nc_puts(const char *s)
|
||||||
return;
|
return;
|
||||||
output_recursion = 1;
|
output_recursion = 1;
|
||||||
|
|
||||||
if ((len = strlen (s)) > 512)
|
len = strlen(s);
|
||||||
len = 512;
|
while (len) {
|
||||||
|
int send_len = min(len, 512);
|
||||||
nc_send_packet (s, len);
|
nc_send_packet(s, send_len);
|
||||||
|
len -= send_len;
|
||||||
|
s += send_len;
|
||||||
|
}
|
||||||
|
|
||||||
output_recursion = 0;
|
output_recursion = 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue