In message <8106242a53.matt...@sinenomine.freeserve.co.uk>
 on 10 Mar 2013 Matthew Phillips  wrote:

> The implementation does check that R4 values are going up by one per
> directory entry, and if it finds this not to be the case, enumeration is
> stopped to be on the safe side.  Removing this check, which can be found in
> this block of code
> 
>      /* Check if we have a monotonic unit increase OS_GBPB
>         offset, if not, we don't do anything.  */
>      if (stream->gbpb_off + regs[3] != regs[4])
>        {
>          stream->gbpb_off = stream->dd_off = GBPB_END_ENUM;
>          return 0;
>        }
> 
> could well actually cure the problem as far as FAT32FS goes, because that
> filing system copes with reversing R4 values by a single step, but in
> general it is a useful safety check which needs to be kept while the
> functions are implemented in this manner.

Ignore that: there are plenty of cases where the current implementation would
fail on FAT32FS if the above check were removed.  You only have to have had a
few things deleted from the directory for it to cause trouble, depending on
what the caller is trying to do with telldir/seekdir of course.

-- 
Matthew Phillips
Durham

_______________________________________________
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

Reply via email to