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
@@ -91,11 +91,12 @@ variable file-size
|
|||||||
|
|
||||||
: dir ( "{paths}<cr>" -- )
|
: dir ( "{paths}<cr>" -- )
|
||||||
linefeed parse
|
linefeed parse
|
||||||
|
split-path-device
|
||||||
open-dev dup 0= if
|
open-dev dup 0= if
|
||||||
drop
|
drop
|
||||||
exit
|
exit
|
||||||
then
|
then
|
||||||
dup
|
-rot 2 pick
|
||||||
" dir" rot ['] $call-method catch
|
" dir" rot ['] $call-method catch
|
||||||
if
|
if
|
||||||
3drop
|
3drop
|
||||||
|
|||||||
@@ -47,3 +47,24 @@
|
|||||||
c@ r@ = if 1- then then
|
c@ r@ = if 1- then then
|
||||||
r> drop
|
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
|
||||||
|
;
|
||||||
|
|
||||||
|
|||||||
@@ -358,7 +358,7 @@ grubfs_files_probe( grubfs_info_t *dummy )
|
|||||||
|
|
||||||
/* static method, ( pathstr len ihandle -- ) */
|
/* static method, ( pathstr len ihandle -- ) */
|
||||||
static void
|
static void
|
||||||
grubfs_files_dir( grubfs_info_t *mi )
|
grubfs_files_dir( grubfs_info_t *dummy )
|
||||||
{
|
{
|
||||||
forth_printf("dir method not implemented for grubfs filesystem\n");
|
forth_printf("dir method not implemented for grubfs filesystem\n");
|
||||||
POP();
|
POP();
|
||||||
|
|||||||
Reference in New Issue
Block a user