Implement command "dir <path>".

This is the generic command, it needs support from the filesystem 
packages.

Signed-off-by: Laurent Vivier <Laurent@vivier.eu>



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@630 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
Laurent Vivier
2009-11-22 09:58:01 +00:00
parent 8d752aaf26
commit 576f234a27
3 changed files with 34 additions and 0 deletions

View File

@@ -294,6 +294,21 @@ files_block_size( files_info_t *dummy )
PUSH(512);
}
static void
files_dir( files_info_t *mi )
{
fs_ops_t *fs = do_open( my_parent() );
char *path = pop_fstr_copy();
if (!path)
return;
if (fs->dir)
fs->dir(mi->file);
free(path);
}
static void
files_initializer( files_info_t *dummy )
{
@@ -309,6 +324,7 @@ NODE_METHODS( files ) = {
{ "seek", files_seek },
{ "tell", files_tell },
{ "load", files_load },
{ "dir", files_dir },
{ "block-size", files_block_size },
/* special */