mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2026-03-14 21:10:27 +01:00
command, log: print with "log show" a full logbuffer
If the logbuffer contains LOGBUFF_LEN chars, they never got
printed with the "log show" command, because chars get
printed with the following for loop:
for (i = 0; i < (size & LOGBUFF_MASK); i++) {
with size = LOGBUFF_LEN and LOGBUFF_MASK = (LOGBUFF_LEN-1)
for loop never executed ...
Fix this.
Signed-off-by: Heiko Schocher <hs@denx.de>
Acked-by: Detlev Zundel <dzu@denx.de>
Fixed merge conflict.
Signed-off-by: Wolfgang Denk <wd@denx.de>
This commit is contained in:
parent
dc3faf09d7
commit
c16a123fd3
1 changed files with 3 additions and 1 deletions
|
|
@ -219,7 +219,9 @@ int do_log (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
|||
start = log->v1.start;
|
||||
size = log->v1.size;
|
||||
}
|
||||
for (i=0; i < (size&LOGBUFF_MASK); i++) {
|
||||
if (size > LOGBUFF_LEN)
|
||||
size = LOGBUFF_LEN;
|
||||
for (i = 0; i < size; i++) {
|
||||
s = lbuf+((start+i)&LOGBUFF_MASK);
|
||||
putc (*s);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue