1
\ *****************************************************************************
2
\ * Copyright (c) 2004, 2008 IBM Corporation
3
\ * All rights reserved.
4
\ * This program and the accompanying materials
5
\ * are made available under the terms of the BSD License
6
\ * which accompanies this distribution, and is available at
7
\ * http://www.opensource.org/licenses/bsd-license.php
10
\ * IBM Corporation - initial implementation
11
\ ****************************************************************************/
13
my-space pci-class-name type
15
my-space pci-device-generic-setup
20
30 config-l@ pci-find-fcode execute-rom-fcode
22
: check-display ( nodepath len -- true|false ) \ true if display found and "screen" alias set
23
\ check if display availabe, set screen alias
24
2dup find-node \ ( path len phandle|0 ) find node
26
\ node found, get "display-type" property
27
s" display-type" rot get-property ( path len true|propaddr proplen 0 )
29
( path len propaddr proplen ) \ property found, check if the value is not "NONE"
30
s" NONE" 0 char-cat ( path len propaddr proplen str strlen ) \ null-terminated NONE string
32
( path len ) \ "display-type" property is not "NONE" so we can set "screen" alias
33
s" screen" 2swap set-alias
34
true ( true ) \ return true
36
2drop false ( false ) \ return false
42
get-node node>path s" /NVDA,DISPLAY-A" $cat check-display
44
\ no display found on DISPLAY-A ... check DISPLAY-B
45
get-node node>path s" /NVDA,DISPLAY-B" $cat check-display
49
s" name" get-my-property drop s" ( " type type s" ) " type cr