Re: [hatari-devel] Max amount of GEMDOS HD file handles?

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Am Thu, 27 Jul 2023 15:22:51 -0400
schrieb "Roger Burrows" <anodyne@xxxxxxxxxxxx>:

> On 27 Jul 2023 at 21:06, Eero Tamminen wrote:
> > 
> > Leaving 64 handles to TOS (same as now), and increasing GEMDOS handles 
> > from 32 e.g. to 64 should be fine, right?
> >   
> This raises an interesting issue.  TOS and EmuTOS allow up to 75 non-standard 
> handles (6-80 inclusive).  Hatari uses 64-95 for its GEMDOS handles.  So it's 
> possible to have different files open on different drives (one GEMDOS and one 
> non-GEMDOS), with the same handle.
> 
> It is of course extrememly unlikely that this will happen, but it could (I have 
> a test program if anyone needs one to verify).  If it *does* happen, I assume 
> that I/O to the non-GEMDOS file will quietly be routed by Hatari to the GEMDOS 
> file.  To be safe, the GEMDOS handles *should* start at 81 or higher.

I'd agree at a first glance - but it could also cause troubles instead:
What if a badly written old program uses the file handle as an index into
an array that has only 80 entries? ... that would break if we'd increase
the base offset ...
So unless we find a real program that requires this change, I'd rather keep
it at the current value.

 Thomas



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/