Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/pmax/dev Fix silly bug where fbconnect() doesn't re...



details:   https://anonhg.NetBSD.org/src/rev/da7ddc5ae6fc
branches:  trunk
changeset: 472272:da7ddc5ae6fc
user:      ad <ad%NetBSD.org@localhost>
date:      Mon Apr 26 12:03:53 1999 +0000

description:
Fix silly bug where fbconnect() doesn't realize that it's already been
called during early console initalization, then pouts because there appears
to be n+1 framebuffers. This whole thing is a mess.

diffstat:

 sys/arch/pmax/dev/fb.c |  14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diffs (29 lines):

diff -r 8f3d3aad6824 -r da7ddc5ae6fc sys/arch/pmax/dev/fb.c
--- a/sys/arch/pmax/dev/fb.c    Mon Apr 26 10:50:44 1999 +0000
+++ b/sys/arch/pmax/dev/fb.c    Mon Apr 26 12:03:53 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fb.c,v 1.23 1999/04/24 08:01:03 simonb Exp $   */
+/*     $NetBSD: fb.c,v 1.24 1999/04/26 12:03:53 ad Exp $       */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -210,12 +210,14 @@
                    && fbcd.cd_devs [fbix]->fi_unit == info -> fi_unit)
                        break;
 
-       if (fbcd.cd_ndevs >= NFB) {
-               printf ("fb: more frame buffers probed than configured!\n");
-               return;
+       if (fbix >= fbcd.cd_ndevs) {
+               if (fbcd.cd_ndevs >= NFB) {
+                       printf("fb: more frame buffers probed than configured!\n");
+                       return;
+               }
+
+               fbix = fbcd.cd_ndevs++;
        }
-
-       fbix = fbcd.cd_ndevs++;
        fbcd.cd_devs [fbix] = info;
 #endif /* FBDRIVER_DOES_ATTACH */
 



Home | Main Index | Thread Index | Old Index