loadb: Properly indicate aborted kermit transfer
When k_recv() returns zero it indicates that kermit transfer was aborted. Function do_load_serial_bin() (caller of load_serial_bin()) interprets value ~0 as aborted transfer, so properly propagates information about aborted transfer from k_recv() to do_load_serial_bin(). Signed-off-by: Pali Rohár <pali@kernel.org>
This commit is contained in:
parent
e199fb35b4
commit
515381414d
@ -535,6 +535,9 @@ static ulong load_serial_bin(ulong offset)
|
||||
udelay(1000);
|
||||
}
|
||||
|
||||
if (size == 0)
|
||||
return ~0; /* Download aborted */
|
||||
|
||||
flush_cache(offset, size);
|
||||
|
||||
printf("## Total Size = 0x%08x = %d Bytes\n", size, size);
|
||||
|
Loading…
Reference in New Issue
Block a user