From e9c36a5c33f281973c79bbe9ac9a03fb749884a8 Mon Sep 17 00:00:00 2001 From: nisimura Date: Sat, 8 Jan 2000 04:40:25 +0000 Subject: [PATCH] Kludge to avoid a panic in badaddr() when no framebuffer is installed. --- sys/arch/luna68k/dev/lunafb.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sys/arch/luna68k/dev/lunafb.c b/sys/arch/luna68k/dev/lunafb.c index 85dd985aba98..651aaabd7d6d 100644 --- a/sys/arch/luna68k/dev/lunafb.c +++ b/sys/arch/luna68k/dev/lunafb.c @@ -1,4 +1,4 @@ -/* $NetBSD: lunafb.c,v 1.2 2000/01/06 00:19:10 nisimura Exp $ */ +/* $NetBSD: lunafb.c,v 1.3 2000/01/08 04:40:25 nisimura Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: lunafb.c,v 1.2 2000/01/06 00:19:10 nisimura Exp $"); +__KERNEL_RCSID(0, "$NetBSD: lunafb.c,v 1.3 2000/01/08 04:40:25 nisimura Exp $"); #include #include @@ -174,8 +174,13 @@ omfbmatch(parent, cf, aux) if (strcmp(ma->ma_name, fb_cd.cd_name)) return (0); +#if 0 /* badaddr() bombs if no framebuffer is installed */ if (badaddr((caddr_t)ma->ma_addr, 4)) return (0); +#else + if (hwplanemask == 0) + return (0); +#endif return (1); }