feat: fstat now handle symbolic link
[lunaix-os.git] / lunaix-os / kernel / tty / lxconsole.c
index 0bcb9b71213e015471405fcfee4dccffc4be1a80..17dddfd1113f3e95a3e5ecb1eb0b5d1efc107572 100644 (file)
@@ -343,7 +343,8 @@ console_start_flushing()
 static int
 lxconsole_spawn_ttydev(struct device_def* devdef)
 {
-    struct device* tty_dev = device_addseq(NULL, &lx_console, "tty");
+    struct device* tty_dev =
+      device_addseq(NULL, &devdef->class, &lx_console, "tty");
     tty_dev->ops.write = __tty_write;
     tty_dev->ops.write_page = __tty_write_pg;
     tty_dev->ops.read = __tty_read;
@@ -357,6 +358,7 @@ lxconsole_spawn_ttydev(struct device_def* devdef)
 }
 
 static struct device_def lxconsole_def = {
+    .name = "Lunaix Virtual Console",
     .class = DEVCLASS(DEVIF_NON, DEVFN_TTY, DEV_BUILTIN, 0),
     .init = lxconsole_spawn_ttydev
 };