Skip to content

Commit

Permalink
Cleanup typos
Browse files Browse the repository at this point in the history
  • Loading branch information
rickgaiser committed Aug 6, 2021
1 parent a600ffe commit fcd5402
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
26 changes: 13 additions & 13 deletions modules/iopcore/cdvdman/device-bdm.c
Expand Up @@ -13,7 +13,7 @@
extern struct cdvdman_settings_bdm cdvdman_settings;
static struct block_device *g_bd = NULL;
static u32 g_bd_sectors_per_sector = 4;
static int usb_io_sema;
static int bdm_io_sema;

extern struct irx_export_table _exp_bdm;

Expand All @@ -29,7 +29,7 @@ void bdm_connect_bd(struct block_device *bd)
g_bd = bd;
g_bd_sectors_per_sector = (2048 / bd->sectorSize);
// Free usage of block device
SignalSema(usb_io_sema);
SignalSema(bdm_io_sema);
}
}

Expand All @@ -38,7 +38,7 @@ void bdm_disconnect_bd(struct block_device *bd)
DPRINTF("disconnecting device %s%dp%d\n", bd->name, bd->devNr, bd->parNr);

// Lock usage of block device
WaitSema(usb_io_sema);
WaitSema(bdm_io_sema);
if (g_bd == bd)
g_bd = NULL;
}
Expand All @@ -58,7 +58,7 @@ void DeviceInit(void)
smp.max = 1;
smp.option = 0;
smp.attr = SA_THPRI;
usb_io_sema = CreateSema(&smp);
bdm_io_sema = CreateSema(&smp);

RegisterLibraryEntries(&_exp_bdm);
}
Expand All @@ -84,16 +84,16 @@ void DeviceFSInit(void)
DPRINTF("USB: LBAs[%d] = %lu\n", i, cdvdman_settings.LBAs[i]);

DPRINTF("Waiting for device...\n");
WaitSema(usb_io_sema);
WaitSema(bdm_io_sema);
DPRINTF("Waiting for device...done!\n");
SignalSema(usb_io_sema);
SignalSema(bdm_io_sema);
}

void DeviceLock(void)
{
DPRINTF("%s\n", __func__);

WaitSema(usb_io_sema);
WaitSema(bdm_io_sema);
}

void DeviceUnmount(void)
Expand All @@ -117,7 +117,7 @@ int DeviceReadSectors(u32 lsn, void *buffer, unsigned int sectors)
r = nlsn = 0;
sectors_to_read = sectors;

WaitSema(usb_io_sema);
WaitSema(bdm_io_sema);
for (i = 0; i < cdvdman_settings.common.NumParts; i++, lbound = ubound, ubound += 0x80000, offslsn -= 0x80000) {

if (lsn >= lbound && lsn < ubound) {
Expand All @@ -141,7 +141,7 @@ int DeviceReadSectors(u32 lsn, void *buffer, unsigned int sectors)
if (esc_flag)
break;
}
SignalSema(usb_io_sema);
SignalSema(bdm_io_sema);

return 0;
}
Expand All @@ -154,16 +154,16 @@ void bdm_readSector(unsigned int lba, unsigned short int nsectors, unsigned char
{
DPRINTF("%s\n", __func__);

WaitSema(usb_io_sema);
WaitSema(bdm_io_sema);
g_bd->read(g_bd, lba, buffer, nsectors);
SignalSema(usb_io_sema);
SignalSema(bdm_io_sema);
}

void bdm_writeSector(unsigned int lba, unsigned short int nsectors, const unsigned char *buffer)
{
DPRINTF("%s\n", __func__);

WaitSema(usb_io_sema);
WaitSema(bdm_io_sema);
g_bd->write(g_bd, lba, buffer, nsectors);
SignalSema(usb_io_sema);
SignalSema(bdm_io_sema);
}
4 changes: 2 additions & 2 deletions modules/iopcore/cdvdman/device-hdd.c
Expand Up @@ -55,7 +55,7 @@ void DeviceInit(void)
hdl_apa_header apaHeader;
int r;

DPRINTF("fs_init: apa header LBA = %lu\n", cdvdman_settings.lba_start);
DPRINTF("DeviceInit: apa header LBA = %lu\n", cdvdman_settings.lba_start);

#ifdef HD_PRO
//For HDPro, as its custom ATAD module does not export ata_io_start() and ata_io_finish(). And it also resets the ATA bus.
Expand All @@ -66,7 +66,7 @@ void DeviceInit(void)
#endif

while ((r = ata_device_sector_io(0, &apaHeader, cdvdman_settings.lba_start, 2, ATA_DIR_READ)) != 0) {
DPRINTF("fs_init: failed to read apa header %d\n", r);
DPRINTF("DeviceInit: failed to read apa header %d\n", r);
DelayThread(2000);
}

Expand Down
10 changes: 5 additions & 5 deletions src/bdmsupport.c
Expand Up @@ -266,13 +266,13 @@ static void bdmLaunchGame(int id, config_set_t *configSet)

// Check VMC cluster chain for fragmentation (write operation can cause damage to the filesystem).
if (fileXioIoctl(fd, USBMASS_IOCTL_CHECK_CHAIN, "") == 1) {
LOG("USBSUPPORT Cluster Chain OK\n");
LOG("BDMSUPPORT Cluster Chain OK\n");
have_error = 0;
bdm_vmc_infos.active = 1;
bdm_vmc_infos.start_sector = start;
LOG("USBSUPPORT VMC slot %d start: 0x%X\n", vmc_id, start);
LOG("BDMSUPPORT VMC slot %d start: 0x%X\n", vmc_id, start);
} else {
LOG("USBSUPPORT Cluster Chain NG\n");
LOG("BDMSUPPORT Cluster Chain NG\n");
have_error = 2;
}
}
Expand Down Expand Up @@ -409,7 +409,7 @@ static int bdmGetImage(char *folder, int isRelative, char *value, char *suffix,
static void bdmCleanUp(int exception)
{
if (bdmGameList.enabled) {
LOG("USBSUPPORT CleanUp\n");
LOG("BDMSUPPORT CleanUp\n");

free(bdmGames);

Expand All @@ -422,7 +422,7 @@ static void bdmCleanUp(int exception)
static void bdmShutdown(void)
{
if (bdmGameList.enabled) {
LOG("USBSUPPORT Shutdown\n");
LOG("BDMSUPPORT Shutdown\n");

free(bdmGames);
}
Expand Down

0 comments on commit fcd5402

Please sign in to comment.