Set the console input in polling mode before entering ukc.
authormpi <mpi@openbsd.org>
Wed, 23 Jul 2014 20:49:53 +0000 (20:49 +0000)
committermpi <mpi@openbsd.org>
Wed, 23 Jul 2014 20:49:53 +0000 (20:49 +0000)
ok miod@, deraadt@, shadchin@

sys/kern/subr_userconf.c

index 4bc7e62..6f570b8 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: subr_userconf.c,v 1.41 2014/07/13 15:29:04 tedu Exp $ */
+/*     $OpenBSD: subr_userconf.c,v 1.42 2014/07/23 20:49:53 mpi Exp $  */
 
 /*
  * Copyright (c) 1996-2001 Mats O Jansson <moj@stacken.kth.se>
@@ -1348,11 +1348,14 @@ user_config(void)
        userconf_init();
        printf("User Kernel Config\n");
 
+       cnpollc(1);
        while (1) {
                printf("UKC> ");
                if (getsn(userconf_cmdbuf, sizeof(userconf_cmdbuf)) > 0 &&
                    userconf_parse(userconf_cmdbuf))
                        break;
        }
+       cnpollc(0);
+
        printf("Continuing...\n");
 }