AltairZ80: mdfc: Fix unit detach.

This commit is contained in:
Howard M. Harte 2021-01-16 13:40:33 -08:00
parent e9d774908e
commit cc464d4acb

View file

@ -1,9 +1,7 @@
/************************************************************************* /*************************************************************************
* * * *
* $Id: mfdc.c 1995 2008-07-15 03:59:13Z hharte $ * * Copyright (c) 2007-2021 Howard M. Harte. *
* * * https://github.com/hharte *
* Copyright (c) 2007-2015 Howard M. Harte. *
* hharte@magicandroidapps.com *
* * * *
* Permission is hereby granted, free of charge, to any person obtaining * * Permission is hereby granted, free of charge, to any person obtaining *
* a copy of this software and associated documentation files (the * * a copy of this software and associated documentation files (the *
@ -37,9 +35,6 @@
* www.hartetechnologies.com/manuals in the Vector Graphic section * * www.hartetechnologies.com/manuals in the Vector Graphic section *
* for details of the on-disk sector format and programming information. * * for details of the on-disk sector format and programming information. *
* * * *
* Environment: *
* User mode only *
* *
*************************************************************************/ *************************************************************************/
/*#define DBG_MSG */ /*#define DBG_MSG */
@ -308,15 +303,12 @@ static t_stat mfdc_detach(UNIT *uptr)
return SCPE_ARG; return SCPE_ARG;
DBG_PRINT(("Detach MFDC%d\n", i)); DBG_PRINT(("Detach MFDC%d\n", i));
r = diskClose(&mfdc_info->drive[i].imd); if (uptr->u3 == IMAGE_TYPE_IMD) {
if (r != SCPE_OK) diskClose(&mfdc_info->drive[i].imd);
return r; }
r = detach_unit(uptr); /* detach unit */ r = detach_unit(uptr); /* detach unit */
if (r != SCPE_OK) return r;
return r;
return SCPE_OK;
} }