>>> 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 think it is ambiguous, but I am happy to accept your interpretation.
>
> I could not apply your patch directly as the line numbers did not seem
> to match up. Nevertheless I have included a patch below which I
> believe is equivalent. It no longer returns R4=-1 unless R3==0. If
> your testing shows this is OK I will commit it.
>
> diff -r c5471302c053 src/hostfs.c
> --- a/src/hostfs.c    Wed Apr 07 22:42:53 2010 +0100
> +++ b/src/hostfs.c    Mon Apr 12 21:28:48 2010 +0100
> @@ -1758,7 +1758,7 @@
>      }
>
>      /* Find out whether we have now completed the directory */
> -    if (offset >= cache_entries_count) {
> +    if (offset >= cache_entries_count && count == 0) {
>        /* We have completed the directory - return this fact */
>        dbug_hostfs("HostFS completed directory\n");
>        state->Reg[4] = (uint32_t) -1;
>
I have tested this fix and I can confirm that it works. Booting from HostFS
works again

thank you for your efforts,

Leo



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

Reply via email to