1
0
Fork 0
mirror of https://github.com/suchmememanyskill/TegraExplorer.git synced 2024-12-02 00:32:10 +00:00

Step 3: Fix up crypto

This commit is contained in:
suchmememanyskill 2022-01-22 15:56:31 +01:00
parent 626cae4e00
commit c8468a6d73
4 changed files with 5 additions and 6 deletions

View file

@ -4,6 +4,7 @@ For future reference if updating the BDK
## /bdk/sec/SE.c&h ## /bdk/sec/SE.c&h
- Added se_aes_cmac - Added se_aes_cmac
- Added se_calc_hmac_sha256
## /bdk/usb ## /bdk/usb
- Removed entirely - Removed entirely

View file

@ -63,7 +63,7 @@ DRESULT disk_read (
return sdmmc_storage_read(&sd_storage, sector, count, buff) ? RES_OK : RES_ERROR; return sdmmc_storage_read(&sd_storage, sector, count, buff) ? RES_OK : RES_ERROR;
case DRIVE_BIS: case DRIVE_BIS:
return nx_emmc_bis_read(sector, count, buff); return nx_emmc_bis_read(sector, count, buff) ? RES_OK : RES_ERROR;
} }
return RES_ERROR; return RES_ERROR;
@ -85,7 +85,7 @@ DRESULT disk_write (
return sdmmc_storage_write(&sd_storage, sector, count, (void *)buff) ? RES_OK : RES_ERROR; return sdmmc_storage_write(&sd_storage, sector, count, (void *)buff) ? RES_OK : RES_ERROR;
case DRIVE_BIS: case DRIVE_BIS:
return nx_emmc_bis_write(sector, count, (void *)buff); return nx_emmc_bis_write(sector, count, (void *)buff) ? RES_OK : RES_ERROR;
} }
return RES_ERROR; return RES_ERROR;

View file

@ -42,7 +42,7 @@ ErrCode_t EmmcDumpToFile(const char *path, u32 lba_start, u32 lba_end, u8 force,
int readRes = 0; int readRes = 0;
if (crypt) if (crypt)
readRes = !nx_emmc_bis_read(curLba, num, buff); readRes = nx_emmc_bis_read(curLba, num, buff);
else else
readRes = emummc_storage_read(curLba, num, buff); readRes = emummc_storage_read(curLba, num, buff);
@ -106,7 +106,7 @@ ErrCode_t EmmcRestoreFromFile(const char *path, u32 lba_start, u32 lba_end, u8 f
int writeRes = 0; int writeRes = 0;
if (crypt) if (crypt)
writeRes = !nx_emmc_bis_write(curLba, num, buff); writeRes = nx_emmc_bis_write(curLba, num, buff);
else else
writeRes = emummc_storage_write(curLba, num, buff); writeRes = emummc_storage_write(curLba, num, buff);

View file

@ -178,8 +178,6 @@ int emummc_storage_end()
{ {
if (!emu_cfg.enabled || h_cfg.emummc_force_disable) if (!emu_cfg.enabled || h_cfg.emummc_force_disable)
sdmmc_storage_end(&emmc_storage); sdmmc_storage_end(&emmc_storage);
else
sd_end();
return 1; return 1;
} }