[OpenBIOS] [commit] r817 - in trunk/openbios-devel: forth/debugging forth/lib fs/grubfs

repository service svn at openbios.org
Sun Jul 11 20:57:20 CEST 2010


Author: mcayland
Date: Sun Jul 11 20:57:19 2010
New Revision: 817
URL: http://tracker.coreboot.org/trac/openbios/changeset/817

Log:
Switch dir over to use the new static filesystem dir methods.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland at siriusit.co.uk>

Modified:
   trunk/openbios-devel/forth/debugging/client.fs
   trunk/openbios-devel/forth/lib/split.fs
   trunk/openbios-devel/fs/grubfs/grubfs_fs.c

Modified: trunk/openbios-devel/forth/debugging/client.fs
==============================================================================
--- trunk/openbios-devel/forth/debugging/client.fs	Sat Jul 10 15:11:22 2010	(r816)
+++ trunk/openbios-devel/forth/debugging/client.fs	Sun Jul 11 20:57:19 2010	(r817)
@@ -91,11 +91,12 @@
 
 : dir ( "{paths}<cr>" -- )
   linefeed parse
+  split-path-device
   open-dev dup 0= if
     drop
     exit
   then
-  dup
+  -rot 2 pick
   " dir" rot ['] $call-method catch
   if
     3drop

Modified: trunk/openbios-devel/forth/lib/split.fs
==============================================================================
--- trunk/openbios-devel/forth/lib/split.fs	Sat Jul 10 15:11:22 2010	(r816)
+++ trunk/openbios-devel/forth/lib/split.fs	Sun Jul 11 20:57:19 2010	(r817)
@@ -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
+;
+

Modified: trunk/openbios-devel/fs/grubfs/grubfs_fs.c
==============================================================================
--- trunk/openbios-devel/fs/grubfs/grubfs_fs.c	Sat Jul 10 15:11:22 2010	(r816)
+++ trunk/openbios-devel/fs/grubfs/grubfs_fs.c	Sun Jul 11 20:57:19 2010	(r817)
@@ -358,7 +358,7 @@
 
 /* static method, ( pathstr len ihandle -- ) */
 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");
 	POP();



More information about the OpenBIOS mailing list