ringbuf_consume advances the tail ptr, so peek should always
just peek at offset 0
Change-Id: I8d3d22d2ec1e563d73b53ccbad302e6d74e64e53
Signed-off-by: Dima Zavin <dima@android.com>
int i;
int count = fiq_debugger_ringbuf_level(state->tty_rbuf);
for (i = 0; i < count; i++) {
- int c = fiq_debugger_ringbuf_peek(state->tty_rbuf, i);
+ int c = fiq_debugger_ringbuf_peek(state->tty_rbuf, 0);
tty_insert_flip_char(state->tty, c, TTY_NORMAL);
if (!fiq_debugger_ringbuf_consume(state->tty_rbuf, 1))
pr_warn("fiq tty failed to consume byte\n");