mirror of
https://gitlab.com/qemu-project/openbios.git
synced 2024-02-13 08:34:06 +08:00
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
This commit is contained in:
committed by
Mark Cave-Ayland
parent
0d5f749065
commit
dbf16392cc
35
libopenbios/helpers.fs
Normal file
35
libopenbios/helpers.fs
Normal file
@@ -0,0 +1,35 @@
|
||||
\ 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!
|
||||
;
|
||||
Reference in New Issue
Block a user