The recent change to check that the IMD file track header record is 5
bytes introduced a problem with the end-of-file triggering an open file
error - instead of the previous behaviour where the number of bytes in
the track header was ignored and end-of-file was checked.
I noticed this after fetching and compiling the latest simh altairz80 - it
was refusing to my mount floppy disk IMD image files (which I had made
from 8-inch floppies back in 2006).
```
maxi:s100 tony$ altairz80 cpm3bk.ini
Altair 8800 (Z80) simulator V4.0-0 Current simh git commit id: d3f1ee09
Console escape is CTRL-\
I8272: IMD disk corrupt.
/Users/tony/s100/cpm3bk.ini-58> att disk1a0 /Users/tony/s100/C3BKSIMH.IMD
File open error
```
Looking at the commit history, I saw the change by Howard Harte to
sim_imd.c to "Resolve CID 1502448, 1502460" - presumably to fix the
call to sim_fread() that was not checking the returned result.
Howard's "fix" broke the parsing of the IMD file sector headers by
not checking for an end-of-file condition (at the end of file it
would read 0 bytes and this was now treated as a fatal error - whereas
the old code had a check for end-of-file after the call to sim_fread()).
This commit now detects end-of-file correctly, as well as verifying
the track header is 5 bytes.
ISO files and real CDs exist which don't have ISO 9660 file structure.
These do contain ODS2 file systems since they were produced before
ISO 9660 was standardized and certainly before OS support for ISO
9660 was added. As such, any file named .iso or .ISO will always be
attached read-only since CDs are never naturally writable devices.
Updates the previous commit to do it better, by not changing
the return value of get_rsts_filesystem_size -- it still returns
the size, at least our best guess of it (for RSTS it's not possible
to get it correct in every case, but it will be correct for
most scenarios).
Coverity is confusing routines by the same name from different simulators.
Making these routines static should solve the problem.
Also fix un-checked status complaint.
One of the two parallel interface consoles (TTY26) works in the Videoton-340 mode;
disconnecting a remote TTY session works like powering the terminal down.
After reconnecting, it is necessary to type "HYC" blindly to re-initialize the line.
Added TMXR line reordering.
Coverity flagged one magtape simulator for having fewer case breakouts
than the range of MTSE_x errors, after they were expanded for
MTSE_LEOT (listed as "V4 compatibility") and MTSE_RUNAWAY (for
Dave Bryan's implementation of erase and erase gap).
According to Dave, it turns out that MTSE_RUNAWAY can only be
returned if the magtape simulator supports and implements a density
specification and the ERASE function. The simulators Bob Supnik wrote
don't meet that criteria, so the expanded errors can't be returned.
Simply add a "default" case to the map logic returning SCPE_IERR for
unexpected cases.