mirror of
https://gitlab.com/qemu-project/openbios.git
synced 2024-02-13 08:34:06 +08:00
Switch dir over to use the new static filesystem dir methods.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@817 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
committed by
Mark Cave-Ayland
parent
a5511ad95c
commit
f1e745579c
@@ -47,3 +47,24 @@
|
||||
c@ r@ = if 1- then then
|
||||
r> drop
|
||||
;
|
||||
|
||||
\ split <param-text> into separate path and device strings
|
||||
: split-path-device ( str len -- pathstr len devstr len )
|
||||
ascii , left-split 2 pick 0= if
|
||||
\ No comma - so either <dev>:<id> or <dev>:<id><path>
|
||||
2dup ascii \ strchr 0= if
|
||||
\ No backslash so just <dev> or <dev>:<id>
|
||||
s" " 2swap \ ( pathstr len devstr len )
|
||||
else
|
||||
\ Contains backslash, must be a <dev>:<id><path>
|
||||
ascii : left-split \ ( pathstr len devstr len )
|
||||
then
|
||||
|
||||
\ Remove RHS split (unused)
|
||||
4 roll drop
|
||||
4 roll drop
|
||||
else
|
||||
\ Contains comma so split is already correct
|
||||
then
|
||||
;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user