TAPE: Properly report a tape format error when a TPC format tape fails the record structure validation checks.

This commit is contained in:
Mark Pizzolato 2015-11-22 21:52:42 -08:00
parent 0f43551d8c
commit 00a8b74b66

View file

@ -525,13 +525,14 @@ t_stat sim_tape_detach (UNIT *uptr)
struct tape_context *ctx = (struct tape_context *)uptr->tape_ctx;
uint32 f = MT_GET_FMT (uptr);
t_stat r;
t_bool auto_format;
t_bool auto_format = FALSE;
if ((uptr == NULL) || !(uptr->flags & UNIT_ATT))
return SCPE_IERR;
if (uptr->io_flush)
uptr->io_flush (uptr); /* flush buffered data */
if (ctx)
auto_format = ctx->auto_format;
sim_tape_clr_async (uptr);