[SLOF] [PATCH] fat-files: Add dir support
Benjamin Herrenschmidt
benh at kernel.crashing.org
Thu Jun 9 18:08:31 AEST 2016
On Thu, 2016-06-09 at 02:24 -0500, Segher Boessenkool wrote:
> On Thu, Jun 09, 2016 at 01:47:43PM +1000, Benjamin Herrenschmidt
> wrote:
> > : seek ( lo hi -- status )
> > + dir? @ IF ABORT" fat-files: trying to seek a dir" THEN
>
> ABORT" has an IF built-in, so this should be
>
> dir? @ ABORT" fat-files: trying to seek a dir"
>
> > : dir
> > - dir? @ IF file-cluster @ .dir ELSE ." not a directory!" cr THEN
> > + dir? @ IF file-cluster @ .dir ELSE cr ." not a directory!" THEN
> > ;
>
> Belongs in the other patch?
>
> > : open
> > do-super
> > 0 my-args find-path
> > - 0= IF free-data false EXIT
> > - THEN
> > - dir? ! file-len ! file-cluster !
> > - dir? @ IF
> > + 0= IF close false EXIT THEN
> > + dir? ! file-len ! file-cluster !
> > + dir? @ 0= IF
> > 0 0 seek 0=
> > ELSE true THEN
> > ;
>
> This as well, I guess?
Nah I mixed up the patches. The global dir method should only
touch boot.fs and everything in fat-files.fs should be in this one.
I'll resend tomorrow after addressing your comments.
Cheers,
Ben.
More information about the SLOF
mailing list