loop till quit
authorderaadt <deraadt@openbsd.org>
Mon, 2 Sep 1996 02:46:39 +0000 (02:46 +0000)
committerderaadt <deraadt@openbsd.org>
Mon, 2 Sep 1996 02:46:39 +0000 (02:46 +0000)
sys/kern/subr_userconf.c

index 3ae0661..3bbdb4a 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: subr_userconf.c,v 1.6 1996/08/15 13:49:50 niklas Exp $        */
+/*     $OpenBSD: subr_userconf.c,v 1.7 1996/09/02 02:46:39 deraadt Exp $       */
 
 /*
  * Copyright (c) 1996 Mats O Jansson <moj@stacken.kth.se>
@@ -862,10 +862,11 @@ user_config()
        userconf_init();
        printf("User Kernel Config\n");
        
-       printf(prompt);
-       while (getsn(userconf_cmdbuf, sizeof(userconf_cmdbuf)) != 0) {
-               if (userconf_parse(userconf_cmdbuf)) break;
+       while (1) {
                printf(prompt);
+               if (getsn(userconf_cmdbuf, sizeof(userconf_cmdbuf)) > 0 &&
+                   userconf_parse(userconf_cmdbuf))
+                       break;
        }
        printf("Continuing...\n");
 }