dir command cleanup

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@635 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
Laurent Vivier
2009-11-26 01:47:36 +00:00
parent fc0e681a57
commit 5e57ac49a0
2 changed files with 7 additions and 17 deletions

View File

@@ -308,20 +308,18 @@ variable bootinfo-size
; ;
: dir ( "{paths}<cr>" -- ) : dir ( "{paths}<cr>" -- )
linefeed parse 2dup linefeed parse
open-dev dup 0= if open-dev dup 0= if
3drop drop
exit exit
then then
dup >r dup
dup ihandle>phandle " dir" rot find-method ( xt 0|1 ) " dir" rot ['] $call-method catch
if if
swap call-package
else
3drop 3drop
cr ." Cannot find dir for this package" cr ." Cannot find dir for this package"
then then
r> close-dev close-dev
; ;
: go ( -- ) : go ( -- )

View File

@@ -297,16 +297,8 @@ files_block_size( files_info_t *dummy )
static void static void
files_dir( files_info_t *mi ) files_dir( files_info_t *mi )
{ {
fs_ops_t *fs = do_open( my_parent() ); if (mi->fs->dir)
char *path = pop_fstr_copy(); mi->fs->dir(mi->file);
if (!path)
return;
if (fs->dir)
fs->dir(mi->file);
free(path);
} }
static void static void