MCPcopy Create free account
hub / github.com/BlitterStudio/amiberry / drive_image_free

Function drive_image_free

src/disk.cpp:775–805  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

773}
774
775static void drive_image_free (drive *drv)
776{
777 switch (drv->filetype)
778 {
779 case ADF_IPF:
780#ifdef CAPS
781 caps_unloadimage(drv->drvnum);
782#endif
783 break;
784 case ADF_SCP:
785#ifdef SCP
786 scp_close(drv->drvnum);
787#endif
788 break;
789 case ADF_FDI:
790#ifdef FDI2RAW
791 fdi2raw_header_free(drv->fdi);
792 drv->fdi = 0;
793#endif
794 break;
795 default:
796 break;
797 }
798 drv->filetype = ADF_NONE;
799 zfile_fclose(drv->diskfile);
800 drv->diskfile = NULL;
801 zfile_fclose(drv->writediskfile);
802 drv->writediskfile = NULL;
803 zfile_fclose(drv->pcdecodedfile);
804 drv->pcdecodedfile = NULL;
805}
806
807static int drive_insert (drive * drv, struct uae_prefs *p, int dnum, const TCHAR *fname, bool fake, bool writeprotected);
808

Callers 4

reset_driveFunction · 0.85
disk.cppFile · 0.85
drive_ejectFunction · 0.85
DISK_freeFunction · 0.85

Calls 4

caps_unloadimageFunction · 0.85
scp_closeFunction · 0.85
fdi2raw_header_freeFunction · 0.85
zfile_fcloseFunction · 0.85

Tested by

no test coverage detected