kgdboc,kdb: Allow kdb to work on a non open console port
[sfrench/cifs-2.6.git] / kernel / debug / kdb / kdb_io.c
index 8339b291e8bc23c3acbc434da51df87ce8c796db..58be7e9c9e95114e5ff7f84949cd06a01c75c1c8 100644 (file)
@@ -673,6 +673,14 @@ kdb_printit:
        if (!dbg_kdb_mode && kgdb_connected) {
                gdbstub_msg_write(kdb_buffer, retlen);
        } else {
+               if (!dbg_io_ops->is_console) {
+                       len = strlen(kdb_buffer);
+                       cp = kdb_buffer;
+                       while (len--) {
+                               dbg_io_ops->write_char(*cp);
+                               cp++;
+                       }
+               }
                while (c) {
                        c->write(c, kdb_buffer, retlen);
                        touch_nmi_watchdog();
@@ -719,6 +727,14 @@ kdb_printit:
                kdb_input_flush();
                c = console_drivers;
 
+               if (!dbg_io_ops->is_console) {
+                       len = strlen(moreprompt);
+                       cp = moreprompt;
+                       while (len--) {
+                               dbg_io_ops->write_char(*cp);
+                               cp++;
+                       }
+               }
                while (c) {
                        c->write(c, moreprompt, strlen(moreprompt));
                        touch_nmi_watchdog();