Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src/sys/dev Pull up revision 1.33 (requested by he):
details: https://anonhg.NetBSD.org/src/rev/5a10ccc3793d
branches: netbsd-1-4
changeset: 469648:5a10ccc3793d
user: he <he%NetBSD.org@localhost>
date: Tue Oct 26 21:12:00 1999 +0000
description:
Pull up revision 1.33 (requested by he):
Catch a console configuration error. Instead of jumping through
cdevsw indexed on major(NODEV), call panic, fixing PR#8690.
diffstat:
sys/dev/cons.c | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diffs (25 lines):
diff -r 597cde02165b -r 5a10ccc3793d sys/dev/cons.c
--- a/sys/dev/cons.c Tue Oct 26 20:40:38 1999 +0000
+++ b/sys/dev/cons.c Tue Oct 26 21:12:00 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cons.c,v 1.32 1996/09/07 12:40:54 mycroft Exp $ */
+/* $NetBSD: cons.c,v 1.32.22.1 1999/10/26 21:12:00 he Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -75,6 +75,15 @@
* open() calls.
*/
dev = cn_tab->cn_dev;
+ if (dev == NODEV) {
+ /*
+ * This is most likely an error in the console attach
+ * code. Panicing looks better than jumping into nowhere
+ * through cdevsw below....
+ */
+ panic("cnopen: cn_tab->cn_dev == NODEV\n");
+ }
+
if (cn_devvp == NULLVP) {
/* try to get a reference on its vnode, but fail silently */
cdevvp(dev, &cn_devvp);
Home |
Main Index |
Thread Index |
Old Index