[OpenBIOS] r635 - in trunk/openbios-devel: forth/debugging modules

svn at openbios.org svn at openbios.org
Thu Nov 26 02:47:36 CET 2009


Author: laurent
Date: 2009-11-26 02:47:36 +0100 (Thu, 26 Nov 2009)
New Revision: 635

Modified:
   trunk/openbios-devel/forth/debugging/client.fs
   trunk/openbios-devel/modules/filesystems.c
Log:
dir command cleanup

Modified: trunk/openbios-devel/forth/debugging/client.fs
===================================================================
--- trunk/openbios-devel/forth/debugging/client.fs	2009-11-23 21:43:09 UTC (rev 634)
+++ trunk/openbios-devel/forth/debugging/client.fs	2009-11-26 01:47:36 UTC (rev 635)
@@ -308,20 +308,18 @@
   ;
 
 : dir ( "{paths}<cr>" -- )
-  linefeed parse 2dup
+  linefeed parse
   open-dev dup 0= if
-    3drop
+    drop
     exit
   then
-  dup >r
-  dup ihandle>phandle " dir" rot find-method ( xt 0|1 )
+  dup
+  " dir" rot ['] $call-method catch
   if
-    swap call-package
-  else
     3drop
     cr ." Cannot find dir for this package"
   then
-  r> close-dev
+  close-dev
 ;
 
 : go    ( -- )

Modified: trunk/openbios-devel/modules/filesystems.c
===================================================================
--- trunk/openbios-devel/modules/filesystems.c	2009-11-23 21:43:09 UTC (rev 634)
+++ trunk/openbios-devel/modules/filesystems.c	2009-11-26 01:47:36 UTC (rev 635)
@@ -297,16 +297,8 @@
 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);
+	if (mi->fs->dir)
+		mi->fs->dir(mi->file);
 }
 
 static void




More information about the OpenBIOS mailing list