1
0
mirror of https://github.com/simh/simh.git synced 2026-01-25 11:46:37 +00:00

PDP11, Unibus & Qbus VAXen: Properly set RQ device unit names in extended units

This commit is contained in:
Mark Pizzolato
2022-06-19 19:15:32 -07:00
parent 4cf86e0e64
commit ec117739b7

View File

@@ -2899,12 +2899,12 @@ if (!plugs_inited ) {
rq_devmap[i]->units[RQ_QUEUE].flags = UNIT_DIS;
sprintf (uname, "%s-QUESVC", rq_devmap[i]->name);
sim_set_uname (&rq_devmap[i]->units[RQ_QUEUE], uname);
free (rq_devmap[i]->units[0].uname); /* We're going to use unit 0 as a template for extended units */
rq_devmap[i]->units[0].uname = NULL; /* free the only potentially allocated pointer in the structure */
for (d = 0; d < rq_devmap[i]->numunits - 2; d++) {
if (d >= RQ_NUMDR) {
free (rq_devmap[i]->units[d].uname); /* Make sure to not lose a populated uname pointer */
rq_devmap[i]->units[d].uname = NULL;
free (rq_devmap[i]->units[0].uname); /* We're going to use unit 0 as a template for extended units */
rq_devmap[i]->units[0].uname = NULL; /* free the only potentially allocated pointer in the structure */
rq_devmap[i]->units[d] = rq_devmap[i]->units[0]; /* Overwrite additional unit with unit0 as a template */
rq_devmap[i]->units[d].flags |= UNIT_DIS;
rq_devmap[i]->units[d].flags &= ~UNIT_DISABLE;