Module Name: src
Committed By: martin
Date: Fri Oct 26 18:16:42 UTC 2018
Modified Files:
src/sys/kern: init_main.c
Log Message:
Only print the "no console" warning when booting verbose or debug.
It is a normal condition in many setups and has no consequences for
the user, so do not scare them.
To generate a diff of this commit:
cvs rdiff -u -r1.498 -r1.499 src/sys/kern/init_main.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/kern/init_main.c
diff -u src/sys/kern/init_main.c:1.498 src/sys/kern/init_main.c:1.499
--- src/sys/kern/init_main.c:1.498 Tue Jul 3 03:37:03 2018
+++ src/sys/kern/init_main.c Fri Oct 26 18:16:42 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: init_main.c,v 1.498 2018/07/03 03:37:03 ozaki-r Exp $ */
+/* $NetBSD: init_main.c,v 1.499 2018/10/26 18:16:42 martin Exp $ */
/*-
* Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -97,7 +97,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.498 2018/07/03 03:37:03 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.499 2018/10/26 18:16:42 martin Exp $");
#include "opt_ddb.h"
#include "opt_inet.h"
@@ -889,12 +889,14 @@ check_console(struct lwp *l)
error = namei_simple_kernel("/dev/console",
NSM_FOLLOW_NOEMULROOT, &vp);
- if (error == 0)
+ if (error == 0) {
vrele(vp);
- else if (error == ENOENT)
- printf("warning: no /dev/console\n");
- else
+ } else if (error == ENOENT) {
+ if (boothowto & (AB_VERBOSE|AB_DEBUG))
+ printf("warning: no /dev/console\n");
+ } else {
printf("warning: lookup /dev/console: error %d\n", error);
+ }
}
/*