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:
Mark Cave-Ayland
2010-07-11 18:57:19 +00:00
committed by Mark Cave-Ayland
parent a5511ad95c
commit f1e745579c
3 changed files with 24 additions and 2 deletions

View File

@@ -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
;