Skip to content

Commit

Permalink
kgdb: Respect that flush op is optional
Browse files Browse the repository at this point in the history
Not all kgdb I/O drivers implement a flush operation. Adjust
gdbstub_exit accordingly.

Signed-off-by: Jan Kiszka <[email protected]>
Signed-off-by: Jason Wessel <[email protected]>
  • Loading branch information
jan-kiszka authored and jwessel committed Mar 22, 2012
1 parent 639077f commit 9fbe465
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kernel/debug/gdbstub.c
Original file line number Diff line number Diff line change
Expand Up @@ -1129,5 +1129,6 @@ void gdbstub_exit(int status)
dbg_io_ops->write_char(hex_asc_lo(checksum));

/* make sure the output is flushed, lest the bootloader clobber it */
dbg_io_ops->flush();
if (dbg_io_ops->flush)
dbg_io_ops->flush();
}

0 comments on commit 9fbe465

Please sign in to comment.