Monday, 4 March 2013

Re: [gccsdk] unixlib directory iteration doesn't work on Fat32FS

In message <DUB120-DS7E48892A10433C7CA0983F0FA0@phx.gbl>
"Alan Buckley" <alan_baa@hotmail.com> wrote:

> From comments when I mentioned this bug on the ROOL forum it made me think Fat32FS does not increment the value as expected by the hack.

It's very much possible that this wrong assumption is the cause of your
problem.

However for enumeration purposes we're using 1 KByte buffer so
you would get a correct result for a 'modest' number of files in
your cc subdirectory.

> Is there anybody who could look at to confirm my findings (and possibly fix) this?

I'm not using FatFS32 myself but this can be very easily tested in
BASIC, just write a dir enum based on OS_GBPB (fetching at most 1
element) and see what kind of offsets this generates.

If that's the issue, I guess the dirent() routines need to be rewritten
from scratch (together with some small testqueue code) by enumerating
the full RISC OS directory contents at opendir() time. That's the only
way to get a bulletproof implementation.

John.
--
John Tytgat, in his comfy chair at home
John.Tytgat@aaug.net

_______________________________________________
GCCSDK mailing list gcc@gccsdk.riscos.info
Bugzilla: http://www.riscos.info/bugzilla/index.cgi
List Info: http://www.riscos.info/mailman/listinfo/gcc
Main Page: http://www.riscos.info/index.php/GCCSDK

No comments:

Post a Comment