refactor: more compact log message
[lunaix-os.git] / lunaix-os / kernel / tty / lxconsole.c
index 3404450048a9802cd638e0bdac58170db5abc902..31afa6490766a3a5873096c5e99aca63016751d0 100644 (file)
@@ -29,7 +29,7 @@ static volatile char ttychr;
 
 static volatile pid_t fg_pgid = 0;
 
-inline void
+static inline void
 print_control_code(const char cntrl)
 {
     console_write_char('^');
@@ -294,6 +294,10 @@ console_write(struct console* console, uint8_t* data, size_t size)
     console->wnd_start = rd_ptr;
     fbuf->flags |= FIFO_DIRTY;
     mutex_unlock(&fbuf->lock);
+
+    if (!lx_console.flush_timer) {
+        console_flush();
+    }
 }
 
 void