SCP: Move test for unit disabled to also cover devices with attach routines
This commit is contained in:
parent
f1f8c8550b
commit
133cf727d5
1 changed files with 2 additions and 2 deletions
4
scp.c
4
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)
|
||||
|
|
Loading…
Add table
Reference in a new issue