pdp11_dmc - Update from Rob Jarratt
Don't do anything if not attached. Fix issue #28 If attach when already attached then detach first. Error checking for already attached in dmc_settype() fixed.
This commit is contained in:
parent
cbe11147fc
commit
7345b00787
1 changed files with 8 additions and 1 deletions
|
@ -28,6 +28,8 @@
|
||||||
|
|
||||||
Modification history:
|
Modification history:
|
||||||
|
|
||||||
|
25-Jan-13 RJ Error checking for already attached in dmc_settype() fixed.
|
||||||
|
25-Jan-13 RJ If attach when already attached then detach first.
|
||||||
23-Jan-13 RJ Don't do anything if not attached. See https://github.com/simh/simh/issues/28
|
23-Jan-13 RJ Don't do anything if not attached. See https://github.com/simh/simh/issues/28
|
||||||
23-Jan-13 RJ Clock co-scheduling move to generic framework (from Mark Pizzolato)
|
23-Jan-13 RJ Clock co-scheduling move to generic framework (from Mark Pizzolato)
|
||||||
21-Jan-13 RJ Added help.
|
21-Jan-13 RJ Added help.
|
||||||
|
@ -674,7 +676,7 @@ t_stat dmc_settype (UNIT* uptr, int32 val, char* cptr, void* desc)
|
||||||
CTLR *controller = dmc_get_controller_from_unit(uptr);
|
CTLR *controller = dmc_get_controller_from_unit(uptr);
|
||||||
|
|
||||||
if (!cptr) return SCPE_IERR;
|
if (!cptr) return SCPE_IERR;
|
||||||
if (UNIT_ATT) return SCPE_ALATT;
|
if (dmc_is_attached(uptr)) return SCPE_ALATT;
|
||||||
if (sscanf(cptr, "%s", buf) != 1)
|
if (sscanf(cptr, "%s", buf) != 1)
|
||||||
{
|
{
|
||||||
status = SCPE_ARG;
|
status = SCPE_ARG;
|
||||||
|
@ -2387,6 +2389,11 @@ t_stat dmc_attach (UNIT *uptr, char *cptr)
|
||||||
CTLR *controller = dmc_get_controller_from_unit(uptr);
|
CTLR *controller = dmc_get_controller_from_unit(uptr);
|
||||||
t_stat ans = SCPE_OK;
|
t_stat ans = SCPE_OK;
|
||||||
|
|
||||||
|
if (dmc_is_attached(uptr))
|
||||||
|
{
|
||||||
|
dmc_detach(uptr);
|
||||||
|
}
|
||||||
|
|
||||||
ans = dmc_open_master_socket(controller, cptr);
|
ans = dmc_open_master_socket(controller, cptr);
|
||||||
if (ans == SCPE_OK)
|
if (ans == SCPE_OK)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue