Do not let getty open ite if it's not been initialized.

This commit is contained in:
briggs 1996-05-25 00:56:38 +00:00
parent caf88110f1
commit 10221fc1cd

View File

@ -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;