TAPES: Make sure that all activities related to TPC formatted tapes are read only.
- A -R flag is forced (attach READ ONLY) when TPC formatted tapes are attached. This should avoid updating file modified timestamps by any simh simulator. - All write operations to TPC formatted tapes will fail with a write protected status.
This commit is contained in:
parent
4299ee96db
commit
fc2f3675fc
1 changed files with 3 additions and 1 deletions
|
@ -442,6 +442,8 @@ if (sim_switches & SWMASK ('F')) { /* format spec? */
|
||||||
if (sim_tape_set_fmt (uptr, 0, gbuf, NULL) != SCPE_OK)
|
if (sim_tape_set_fmt (uptr, 0, gbuf, NULL) != SCPE_OK)
|
||||||
return SCPE_ARG;
|
return SCPE_ARG;
|
||||||
}
|
}
|
||||||
|
if (MT_GET_FMT (uptr) == MTUF_F_TPC)
|
||||||
|
sim_switches |= SWMASK ('R'); /* Force ReadOnly attach for TPC tapes */
|
||||||
r = attach_unit (uptr, cptr); /* attach unit */
|
r = attach_unit (uptr, cptr); /* attach unit */
|
||||||
if (r != SCPE_OK) /* error? */
|
if (r != SCPE_OK) /* error? */
|
||||||
return r;
|
return r;
|
||||||
|
@ -1819,7 +1821,7 @@ return (uptr->capac && (uptr->pos >= uptr->capac))? TRUE: FALSE;
|
||||||
|
|
||||||
t_bool sim_tape_wrp (UNIT *uptr)
|
t_bool sim_tape_wrp (UNIT *uptr)
|
||||||
{
|
{
|
||||||
return (uptr->flags & MTUF_WRP)? TRUE: FALSE;
|
return ((uptr->flags & MTUF_WRP) || (MT_GET_FMT (uptr) == MTUF_F_TPC))? TRUE: FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Process I/O error */
|
/* Process I/O error */
|
||||||
|
|
Loading…
Add table
Reference in a new issue