Source-Changes-HG archive

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

[src/netbsd-1-5]: src/sys/arch/sparc/dev Pullup 1.2 from syssrc/sys/dev/sun/f...



details:   https://anonhg.NetBSD.org/src/rev/2ea0d8ebc734
branches:  netbsd-1-5
changeset: 490062:2ea0d8ebc734
user:      tv <tv%NetBSD.org@localhost>
date:      Wed Nov 01 03:22:49 2000 +0000

description:
Pullup 1.2 from syssrc/sys/dev/sun/fb.c by patch [pk]:

fb_is_console(): we must match on the `fb' propery in a V0 PROMs root node
only after establishing that the PROM output device is a frame buffer device.

diffstat:

 sys/arch/sparc/dev/fb.c |  14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diffs (30 lines):

diff -r 2e170feb4edf -r 2ea0d8ebc734 sys/arch/sparc/dev/fb.c
--- a/sys/arch/sparc/dev/fb.c   Wed Nov 01 03:18:05 2000 +0000
+++ b/sys/arch/sparc/dev/fb.c   Wed Nov 01 03:22:49 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fb.c,v 1.45.4.1 2000/06/30 16:27:38 simonb Exp $ */
+/*     $NetBSD: fb.c,v 1.45.4.2 2000/11/01 03:22:49 tv Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -94,14 +94,14 @@
 
        case PROM_OBP_V0:
                /*
-                * Prefer the `fb' property on the root node.
-                * Fall back on prom_stdout() cookie if not present.
+                * First, check if prom_stdout() represents a frame buffer,
+                * then match on the `fb' property on the root node, if any.
                 */
+               if (prom_stdout() != PROMDEV_SCREEN)
+                       return (0);
+
                fbnode = getpropint(findroot(), "fb", 0);
-               if (fbnode == 0)
-                       return (prom_stdout() == PROMDEV_SCREEN);
-               else
-                       return (node == fbnode);
+               return (fbnode == 0 || node == fbnode);
 
        case PROM_OBP_V2:
        case PROM_OBP_V3:



Home | Main Index | Thread Index | Old Index