There are a couple of problems in ioman.c. The first
one I found while trying to call ioman_writeSector()
directly. It turns out that the call to if_writeBuf()
always returns 0, or at least it does when using the
SD card interface. Alas, the test done is <= 0, so it
always fails with an error. But, the library still
worked ok, as ioman_flushSector() which calls
ioman_writeSector() had its conditional test flipped
as well. The call to ioman_writeSector() in
ioman_directSectorWrite() however, would have failed,
as it was done correctly (but I think it is not called
by any of the library code).
I fixed ioman_writeSector() by testing for != 0 the
same as ioman_readSector(). Similarily, I fixed the
conditional in ioman_flushSector(). Define PATCH to
enable these patches.
The updated file is attached.
Hopefully this helps some of you,