Explorar el Código

kgdb: Respect that flush op is optional

Not all kgdb I/O drivers implement a flush operation. Adjust
gdbstub_exit accordingly.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Jan Kiszka hace 13 años
padre
commit
9fbe465efc
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      kernel/debug/gdbstub.c

+ 2 - 1
kernel/debug/gdbstub.c

@@ -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();
 }