Skip to content

Commit

Permalink
c
Browse files Browse the repository at this point in the history
  • Loading branch information
KrahJohlito committed Sep 19, 2024
1 parent bd2441c commit 858becb
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions modules/iopcore/cdvdman/device-bdm.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,13 @@ void bdm_connect_bd(struct block_device *bd)
{
DPRINTF("connecting device %s%dp%d\n", bd->name, bd->devNr, bd->parNr);

struct block_device *current_bd = NULL;

if (bd->devNr == cdvdman_settings.bdDeviceId) {
if (g_bd == NULL && bd->devNr == cdvdman_settings.bdDeviceId) {
DPRINTF("attaching to %s%dp%d\n", bd->name, bd->devNr, bd->parNr);
current_bd = bd;
g_bd = bd;
g_bd_sectors_per_sector = (2048 / bd->sectorSize);
// Free usage of block device
SignalSema(bdm_io_sema);
}

g_bd = current_bd;
}

void bdm_disconnect_bd(struct block_device *bd)
Expand Down Expand Up @@ -117,7 +113,7 @@ int DeviceReadSectors(u32 lsn, void *buffer, unsigned int sectors)
{
int rv = SCECdErNO;

DPRINTF("%s(%u, 0x%p, %u)\n", __func__, (unsigned int)lsn, buffer, sectors);
// DPRINTF("%s(%u, 0x%p, %u)\n", __func__, (unsigned int)lsn, buffer, sectors);

if (g_bd == NULL)
return SCECdErTRMOPN;
Expand Down

0 comments on commit 858becb

Please sign in to comment.