Files
openbios/libopenbios/helpers.fs
Mark Cave-Ayland dbf16392cc Refactoring of the OpenBIOS source code, as discussed on the mailing list. The primary aim of this process is to try and arrange
the source files into a structure whereby it is easier to find the relationship between a forth package word and its C 
implementation, while also creating a libopenbios library into which more common code from the arch/ tree can eventually be 
moved.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> 


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@685 f158a5a8-5612-0410-a976-696ce0be7e32
2010-03-13 10:58:19 +00:00

36 lines
622 B
Forth

\ tag: helper functions
\
\ deblocker / filesystem support
\
\ Copyright (C) 2003 Samuel Rydh
\
\ See the file "COPYING" for further information about
\ the copyright and warranty status of this work.
\
\ create device node and any missing parents.
\ The new node becomes the active package
: create-node ( nodepath -- )
recursive
ascii / right-split
2dup find-dev if
active-package!
2drop
else
( nodename path )
dup if
create-node
else
device-tree @ active-package!
2drop
then
then
new-device
device-name
active-package
finish-device
active-package!
;