From 133cf727d5fc33f38b1a9052aac480d922a7b820 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Tue, 5 Dec 2017 12:17:23 -0800 Subject: [PATCH] SCP: Move test for unit disabled to also cover devices with attach routines --- scp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)