diff --git a/scp.c b/scp.c index 2364519f..a7c66c86 100644 --- a/scp.c +++ b/scp.c @@ -6026,6 +6026,8 @@ return scp_attach_unit (dptr, uptr, gbuf); /* attach */ t_stat scp_attach_unit (DEVICE *dptr, UNIT *uptr, const char *cptr) { +if (uptr->flags & UNIT_DIS) /* disabled? */ + return SCPE_UDIS; if (dptr->attach != NULL) /* device routine? */ return dptr->attach (uptr, (CONST char *)cptr); /* call it */ return attach_unit (uptr, (CONST char *)cptr); /* no, std routine */ @@ -6037,8 +6039,6 @@ t_stat attach_unit (UNIT *uptr, CONST char *cptr) { DEVICE *dptr; -if (uptr->flags & UNIT_DIS) /* disabled? */ - return SCPE_UDIS; if (!(uptr->flags & UNIT_ATTABLE)) /* not attachable? */ return SCPE_NOATT; if ((dptr = find_dev_from_unit (uptr)) == NULL)