From 10221fc1cd4e38a7b332f7e21b8557f9e32a5261 Mon Sep 17 00:00:00 2001 From: briggs Date: Sat, 25 May 1996 00:56:38 +0000 Subject: [PATCH] Do not let getty open ite if it's not been initialized. --- sys/arch/mac68k/dev/ite.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sys/arch/mac68k/dev/ite.c b/sys/arch/mac68k/dev/ite.c index 1327809d5d68..434cc491879a 100644 --- a/sys/arch/mac68k/dev/ite.c +++ b/sys/arch/mac68k/dev/ite.c @@ -1,4 +1,4 @@ -/* $NetBSD: ite.c,v 1.21 1996/05/18 18:54:03 briggs Exp $ */ +/* $NetBSD: ite.c,v 1.22 1996/05/25 00:56:38 briggs Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -134,6 +134,7 @@ long videobitdepth; unsigned long videosize; /* Calculated by itecninit() */ +static int ite_initted = 0; static int width, height; /* width, height in pixels */ static int scrcols, scrrows; /* width, height in characters */ static int screenrowbytes; /* number of visible bytes per row */ @@ -828,6 +829,9 @@ iteopen(dev, mode, devtype, p) dprintf("iteopen(): enter(0x%x)\n", (int) dev); + if (!ite_initted) + return (ENXIO); + if (ite_tty == NULL) tp = ite_tty = ttymalloc(); else @@ -1080,6 +1084,7 @@ itecnprobe(struct consdev * cp) int itecninit(struct consdev * cp) { + ite_initted = 1; width = videosize & 0xffff; height = (videosize >> 16) & 0xffff; scrrows = height / CHARHEIGHT;