--- uae/src/filesys.c 2018/04/24 16:42:15 1.1.1.4 +++ uae/src/filesys.c 2018/04/24 16:43:35 1.1.1.5 @@ -242,6 +242,13 @@ char *set_filesys_unit (struct uaedev_mo if (nr >= mountinfo->num_units) return "No slot allocated for this unit"; + tmpui.hf.fd = 0; + tmpui.devname = 0; + tmpui.volname = 0; + tmpui.rootdir = 0; + tmpui.unit_pipe = 0; + tmpui.back_pipe = 0; + if (volname != 0) { tmpui.volname = my_strdup (volname); tmpui.hf.fd = 0; @@ -290,13 +297,6 @@ char *add_filesys_unit (struct uaedev_mo if (nr >= MAX_UNITS) return "Maximum number of file systems mounted"; - uip->hf.fd = 0; - uip->devname = 0; - uip->volname = 0; - uip->rootdir = 0; - uip->unit_pipe = 0; - uip->back_pipe = 0; - mountinfo->num_units++; retval = set_filesys_unit (mountinfo, nr, volname, rootdir, readonly, secspertrack, surfaces, reserved); @@ -950,6 +950,7 @@ static struct a_inode *new_child_aino (U } else { get_file_attrs (aino); } + recycle_aino (unit, aino); TRACE(("created aino %x, normal\n", aino->uniq)); return aino; @@ -2343,9 +2344,9 @@ action_rename_object (Unit *unit, dpacke } /* @@@ what should we do if there are locks on a1? */ - if (-1 == rename(a1->nname, a2->nname)) { + if (-1 == rename (a1->nname, a2->nname)) { PUT_PCK_RES1 (packet, DOS_FALSE); - PUT_PCK_RES2 (packet, dos_errno()); + PUT_PCK_RES2 (packet, dos_errno ()); return; } move_aino_children (unit, a1, a2);