vkernel - Do not re-initialize vcons
authorAntonio Huete Jimenez <tuxillo@quantumachine.net>
Sat, 30 Jun 2018 19:36:53 +0000 (19:36 +0000)
committerAntonio Huete Jimenez <tuxillo@quantumachine.net>
Sat, 30 Jun 2018 19:37:56 +0000 (19:37 +0000)
- Commit fb3cf125d1 introduced a cninit() call in configure_final()
  and vcons should properly handle multiple initialization.
- This fixes the vkernel boot problem in current master.

sys/platform/vkernel64/platform/console.c

index 1c1d427..2e5c723 100644 (file)
@@ -53,6 +53,7 @@
 static int console_stolen_by_kernel;
 static struct kqueue_info *kqueue_console_info;
 static struct tty *kqueue_console_tty;
+static int vcons_started;
 
 /************************************************************************
  *                         CONSOLE DEVICE                              *
@@ -341,6 +342,9 @@ vconsinit(struct consdev *cp)
 {
        struct sigaction sa;
 
+       if (vcons_started)
+               return;
+       vcons_started = 1;
        vconsole = cp;
 
        tcgetattr(0, &init_tio);