Re: SD2IEC REL support

From: Jim Brain <brain_at_jbrain.com>
Date: Fri, 31 Jan 2020 18:35:32 -0600
Message-ID: <1a75d6d5-642b-2ce4-f8dc-3990608e50cc_at_jbrain.com>
On 1/31/2020 6:14 PM, silverdr_at_wfmh.org.pl wrote:
>
>> On 2020-01-31, at 20:05, silverdr_at_wfmh.org.pl wrote:
>>
>>> If you can create a simple test case that fails, I am happy to look into it.  Though my contributions to sd2iec are miniscule, I did implement some of the REL file support in there, and creating new files, adding records, etc. seemed to all work for me when I tested.  It may have suffered some regression, though, as it's been years.
>> Jim - thanks for stepping-in! I'll send you the PRG I found it failing with.
> I did some debugging and it seems that the file gets actually created inside the directory. The program fails though, because it expects that after the file is created, the returned status is 50, RECORD NOT PRESENT as in other drives or IDE64 for example. SD2IEC returns 00, OK here, which – for whomever checks the status – means the file was not properly created.
>
OK, that is probably my fault, as I would never have guessed a 
successful open should return that error.  But, to fix, using this 
latest copy of the source:

https://sd2iec.de/gitweb/?p=sd2iec.git;a=blob;f=src/fatops.c;h=702e1fd6ae7043bc78babc4dd448182ffc79888c;hb=a9a09fae91d81b80e00178fe266244111d8e4254

Line 777 is where the file is created.  After it, if res == FR_OK, then 
you need to set_error_ts(ERROR_RECORD_MISSING,0,0);

Jim

-- 
Jim Brain
brain_at_jbrain.com
www.jbrain.com
Received on 2020-05-30 00:40:18

Archive generated by hypermail 2.3.0.