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

Function unload_image

src/blkdev_cdimage.cpp:2413–2437  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2411}
2412
2413static void unload_image (struct cdunit *cdu)
2414{
2415 int i;
2416
2417 for (i = 0; i < sizeof cdu->toc / sizeof (struct cdtoc); i++) {
2418 struct cdtoc *t = &cdu->toc[i];
2419 zfile_fclose (t->handle);
2420 if (t->handle != t->subhandle)
2421 zfile_fclose (t->subhandle);
2422 xfree (t->fname);
2423 xfree (t->data);
2424 xfree (t->subdata);
2425 xfree (t->extrainfo);
2426 }
2427#ifdef WITH_CHD
2428 cdrom_close (cdu->chd_cdf);
2429 cdu->chd_cdf = NULL;
2430 if (cdu->chd_f)
2431 cdu->chd_f->close();
2432 cdu->chd_f = NULL;
2433#endif
2434 memset (cdu->toc, 0, sizeof cdu->toc);
2435 cdu->tracks = 0;
2436 cdu->cdsize = 0;
2437}
2438
2439
2440static int open_device (int unitnum, const TCHAR *ident, int flags)

Callers 1

close_deviceFunction · 0.85

Calls 3

zfile_fcloseFunction · 0.85
cdrom_closeFunction · 0.85
closeMethod · 0.65

Tested by

no test coverage detected