1
0
Fork 0
mirror of https://github.com/Scandal-UK/Incognito_RCM.git synced 2024-11-22 11:56:41 +00:00

Fixed a regression bug which involved an overwritten Hekate file

This commit is contained in:
Dan Ware 2020-05-31 22:13:31 +01:00
parent 6bb2687d84
commit 99a2b2be51

View file

@ -149,7 +149,7 @@ bool prodinfo_write(
if(!_emmc_xts(9, 8, 1, tweak, regen_tweak, tweak_exp, prev_cluster, buff, buff, count * 0x200)){ if(!_emmc_xts(9, 8, 1, tweak, regen_tweak, tweak_exp, prev_cluster, buff, buff, count * 0x200)){
return false; return false;
} }
if (nx_emmc_part_write(&storage, prodinfo_part, sector, count, buff)) if (nx_emummc_part_write(&storage, prodinfo_part, sector, count, buff))
{ {
prev_sector = sector + count - 1; prev_sector = sector + count - 1;
return true; return true;
@ -157,3 +157,12 @@ bool prodinfo_write(
return false; return false;
} }
// replacement for nx_emmc_part_write in storage/nx_emmc, which uses sdmmc_storage_write
int nx_emummc_part_write(sdmmc_storage_t *storage, emmc_part_t *part, u32 sector_off, u32 num_sectors, void *buf)
{
// The last LBA is inclusive.
if (part->lba_start + sector_off > part->lba_end)
return 0;
return emummc_storage_write(storage, part->lba_start + sector_off, num_sectors, buf);
}