Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Only print the "no console" warning when booting ve...
details: https://anonhg.NetBSD.org/src/rev/7c6a4d196517
branches: trunk
changeset: 445383:7c6a4d196517
user: martin <martin%NetBSD.org@localhost>
date: Fri Oct 26 18:16:42 2018 +0000
description:
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.
diffstat:
sys/kern/init_main.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diffs (37 lines):
diff -r ab090dda0aac -r 7c6a4d196517 sys/kern/init_main.c
--- a/sys/kern/init_main.c Fri Oct 26 18:06:34 2018 +0000
+++ b/sys/kern/init_main.c Fri Oct 26 18:16:42 2018 +0000
@@ -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 @@
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);
+ }
}
/*
Home |
Main Index |
Thread Index |
Old Index