1
0
mirror of https://github.com/simh/simh.git synced 2026-01-14 07:39:29 +00:00

SCP: Directly call disk and tape detach routines when detach_unit is called

This commit is contained in:
Mark Pizzolato 2023-06-20 18:57:51 -10:00
parent 2d2b8baa4f
commit 158c749a7e

4
scp.c
View File

@ -8724,6 +8724,10 @@ if (!(uptr->flags & UNIT_ATT)) { /* not attached? */
}
if ((dptr = find_dev_from_unit (uptr)) == NULL)
return SCPE_OK;
if ((dptr->flags & DEV_DISK) && ((dptr->flags & DEV_TAPE) == 0))
return sim_disk_detach (uptr);
if ((dptr->flags & DEV_TAPE) && ((dptr->flags & DEV_DISK) == 0))
return sim_tape_detach (uptr);
if ((uptr->flags & UNIT_BUF) && (uptr->filebuf)) {
uint32 cap = (uptr->hwmark + dptr->aincr - 1) / dptr->aincr;
if (((uptr->flags & UNIT_RO) == 0) &&