1
0
mirror of https://github.com/simh/simh.git synced 2026-05-16 18:16:53 +00:00

ETHER: Make sure SET NOASYNC is effective for Ethernet devices

- Make sure that asynchronous mode can't be changed if devices using
   sim_ether are already attached.
- Add missing DEV_ETHER type flag for the only sim_ether using device
   that didn't already have it.
This commit is contained in:
Mark Pizzolato
2024-01-06 14:43:21 -10:00
parent 54f55777f5
commit 4dfb3508bf
3 changed files with 20 additions and 2 deletions

10
scp.c
View File

@@ -6109,6 +6109,16 @@ if (cptr && (*cptr != 0)) /* now eol? */
#ifdef SIM_ASYNCH_IO
if (flag == sim_asynch_enabled) /* already set correctly? */
return SCPE_OK;
if (1) {
uint32 i;
DEVICE *dptr;
for (i = 1; (dptr = sim_devices[i]) != NULL; i++) { /* flush attached files */
if ((DEV_TYPE(dptr) == DEV_ETHER) &&
(dptr->units->flags & UNIT_ATT))
return sim_messagef (SCPE_ALATT, "Can't change asynch mode with %s device attached\n", dptr->name);
}
}
sim_asynch_enabled = flag;
sim_timer_change_asynch ();
if (1) {