>> I have looked into it a bit further.
>> When RISC OS boots it itterates through directories asking for one entry
>> at
>> a time. This in contrast when the filer shows you a directory it then
>> asks
>> for more entries.
>> If during booting Func 15 is called to get an entry the new hostfs code
>> tries to send an indication when the last entry is returned (sets r4 to
>> -1).
>> I do not know if this is allowed or not but the result is that the entry
>> is
>> skipped.
>
> The PRMs state that on exit from FSEntry_Func_15 R4 should contain an
> offset of next item to read (if the directory has not yet been read
> fully) or -1 to indicate that the final entry or entries are being
> returned.
It also states on page 573 of PRM-2 that there are 3 valid return values:
R3=0  && R4 <> -1
R3<>0 && R4 <> -1
R3=0  && R4 = -1

As it does not mention R3<>0 && R4=-1 I think this combination is illegal.

>
> I put together a quick test program that reads the contents of a
> HostFS directory asking for one entry at a time, and the behaviour
> appears fine.
Do you print the R3 and R4 return values and have you compared these with
a test on an ADFS drive? I expect that ADFS does not return R3<>0 && R4=-1
but
returns R3=0 and R4=-1 to indicate end of list.
In my vision this means that HostFS has to confirm to this as not to break
existing code.

>
> I studied the boot sequence of RISC OS 4.02, and found that the
> requests through FSEntry_Func_14 were for 1 entry at a time, and the
> returned values looked OK. For example it looked at the files in
> !Boot.Resources.!System, and returned the correct number of entries
> (11 in my case).
The !Boot uses the Repeat utilty. If I run this I see that the entry that
is last (after the qsort) is always omitted in HostFS. When I run this on
ADFS or the patched HostFS the number of files/directories is as expected.
You can run Repeat as follows:
Repeat echo $ -files  -- this lists the files in the root dir
Repeat echo $ -directories -- this lists the directories in the root dir

>
> Are you able to create a test program that demonstrates the problem?
> That would be very useful. Unfortunately I can not follow your
> explanation beyond the above.
I use the RISC OS repeat program as mentioned above.

I hope this convinces you to use my patch to prevent breaking excisting
programs on HostFS.

Leo

PS: I do not know if the list accepts this email as I send it from another
address then that I was registered with.



_______________________________________________
Rpcemu mailing list
[email protected]
http://www.riscos.info/cgi-bin/mailman/listinfo/rpcemu

Reply via email to