Panic if rasops_init() fails us (should never be the case).

This commit is contained in:
ad 1999-05-15 13:04:03 +00:00
parent 0d472fafcc
commit 3b602e5afa
3 changed files with 12 additions and 7 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: rcons.c,v 1.26 1999/04/26 04:34:00 ad Exp $ */ /* $NetBSD: rcons.c,v 1.27 1999/05/15 13:04:03 ad Exp $ */
/* /*
* Copyright (c) 1995 * Copyright (c) 1995
@ -134,11 +134,12 @@ rcons_connect (info)
wsfont_init(); wsfont_init();
/* Choose 'Gallant' font if this is an 8-bit display */ /* Choose 'Gallant' font if this is an 8-bit display */
if (ri.ri_depth == 8 && (cookie = wsfont_find("Gallant", 0, 0, 0)) >= 0) if (ri.ri_depth == 8 && (cookie = wsfont_find("Gallant", 0, 0, 0)) > 0)
wsfont_lock(cookie, &ri.ri_font, WSFONT_L2R, WSFONT_L2R); wsfont_lock(cookie, &ri.ri_font, WSFONT_L2R, WSFONT_L2R);
/* Get operations set and set framebugger colormap */ /* Get operations set and set framebugger colormap */
rasops_init(&ri, 0, 80, 1, 0); if (rasops_init(&ri, 0, 80, 1, 0))
panic("rcons_connect: rasops_init failed");
if (ri.ri_depth == 8 && info->fi_type.fb_boardtype != PMAX_FBTYPE_MFB) if (ri.ri_depth == 8 && info->fi_type.fb_boardtype != PMAX_FBTYPE_MFB)
info->fi_driver->fbd_putcmap(info, rasops_cmap, 0, 256); info->fi_driver->fbd_putcmap(info, rasops_cmap, 0, 256);

View File

@ -1,4 +1,4 @@
/* $NetBSD: fb.c,v 1.29 1999/05/15 12:52:22 ad Exp $ */ /* $NetBSD: fb.c,v 1.30 1999/05/15 13:04:03 ad Exp $ */
/* /*
* Copyright (c) 1992, 1993 * Copyright (c) 1992, 1993
@ -413,7 +413,9 @@ fbrcons_init(fb)
ri->ri_forcemono = 1; ri->ri_forcemono = 1;
/* Get operations set and connect to rcons */ /* Get operations set and connect to rcons */
rasops_init(ri, maxrow, maxcol, 1, 0); if (rasops_init(ri, maxrow, maxcol, 1, 0))
panic("fbrcons_init: rasops_init failed!");
rc->rc_ops = &ri->ri_ops; rc->rc_ops = &ri->ri_ops;
rc->rc_cookie = &ri; rc->rc_cookie = &ri;
rc->rc_bell = fb_bell; rc->rc_bell = fb_bell;

View File

@ -1,4 +1,4 @@
/* $NetBSD: fb.c,v 1.7 1999/05/15 12:52:22 ad Exp $ */ /* $NetBSD: fb.c,v 1.8 1999/05/15 13:04:03 ad Exp $ */
/* /*
* Copyright (c) 1992, 1993 * Copyright (c) 1992, 1993
@ -289,7 +289,9 @@ fbrcons_init(fb)
ri->ri_forcemono = 1; ri->ri_forcemono = 1;
/* Get operations set and connect to rcons */ /* Get operations set and connect to rcons */
rasops_init(ri, maxrow, maxcol, 1, 0); if (rasops_init(ri, maxrow, maxcol, 1, 0))
panic("fbrcons_init: rasops_init failed!");
rc->rc_ops = &ri->ri_ops; rc->rc_ops = &ri->ri_ops;
rc->rc_cookie = &ri; rc->rc_cookie = &ri;
rc->rc_bell = fb_bell; rc->rc_bell = fb_bell;