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

Function sys_command_open

src/blkdev.cpp:508–528  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

506}
507
508int sys_command_open (int unitnum)
509{
510 struct blkdevstate *st = &state[unitnum];
511 blkdev_fix_prefs (&currprefs);
512 if (!dev_init) {
513 device_func_init (0);
514 }
515
516 if (st->isopen) {
517 st->isopen++;
518 return -1;
519 }
520 st->waspaused = 0;
521 int v = sys_command_open_internal (unitnum, currprefs.cdslots[unitnum].name[0] ? currprefs.cdslots[unitnum].name : NULL, CD_STANDARD_UNIT_DEFAULT);
522 if (!v)
523 return 0;
524#ifdef RETROPLATFORM
525 rp_cd_device_enable (unitnum, true);
526#endif
527 return v;
528}
529
530void sys_command_close (int unitnum)
531{

Callers 7

mount_cdFunction · 0.85
dev_open_2Function · 0.85
scsiemul_switchscsiFunction · 0.85
dev_resetFunction · 0.85
scsi_alloc_cdFunction · 0.85
scsi_alloc_nativeFunction · 0.85
scsi_addnativeFunction · 0.85

Calls 3

blkdev_fix_prefsFunction · 0.85
device_func_initFunction · 0.85

Tested by

no test coverage detected