Module Name:    src
Committed By:   apb
Date:           Sun Apr 12 09:31:32 UTC 2009

Modified Files:
        src/sbin/init: init.c

Log Message:
If MAKEDEV exits non-zero, but was nevertheless able to create
/dev/console, then have init(8) just print a warning instead of
exiting.


To generate a diff of this commit:
cvs rdiff -u -r1.97 -r1.98 src/sbin/init/init.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/init/init.c
diff -u src/sbin/init/init.c:1.97 src/sbin/init/init.c:1.98
--- src/sbin/init/init.c:1.97	Sun Jan 18 00:25:13 2009
+++ src/sbin/init/init.c	Sun Apr 12 09:31:32 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: init.c,v 1.97 2009/01/18 00:25:13 lukem Exp $	*/
+/*	$NetBSD: init.c,v 1.98 2009/04/12 09:31:32 apb Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -42,7 +42,7 @@
 #if 0
 static char sccsid[] = "@(#)init.c	8.2 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: init.c,v 1.97 2009/01/18 00:25:13 lukem Exp $");
+__RCSID("$NetBSD: init.c,v 1.98 2009/04/12 09:31:32 apb Exp $");
 #endif
 #endif /* not lint */
 
@@ -1678,11 +1678,12 @@
 	default:
 		if (waitpid(pid, &status, 0) == -1)
 			break;
-		if (status != 0) {
-			errno = EINVAL;
-			break;
-		}
-		/* Check /dev/console got created */
+		if (status != 0)
+			warn("MAKEDEV exit status %d\n", status);
+		/*
+		 * If /dev/console got created, then return 0
+		 * regardless of MAKEDEV exit status.
+		 */
 		if (access(_PATH_CONSOLE, F_OK) == 0)
 			return 0;
 		_exit(11);

Reply via email to