feat: (iso9660) implement file read (for both interleaved and non-interleaved mode)
[lunaix-os.git] / lunaix-os / kernel / tty / lxconsole.c
index ae5701b5002f8f752032d3e3d6eee6712f610032..d555175a0e1d663c98a53a19bd3705ba301077d2 100644 (file)
@@ -119,7 +119,11 @@ lxconsole_init()
     fifo_init(&lx_console.input, valloc(4096), 4096, 0);
 
     lx_console.flush_timer = NULL;
+}
 
+void
+lxconsole_spawn_ttydev()
+{
     struct device* tty_dev = device_addseq(NULL, &lx_console, "tty");
     tty_dev->write = __tty_write;
     tty_dev->read = __tty_read;
@@ -294,6 +298,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