mirror of
https://github.com/CTCaer/hekate
synced 2024-12-22 11:21:23 +00:00
fss0: Fix parsing Sept from fusee-secondary
This commit is contained in:
parent
01a767cbfa
commit
5a9bbaf900
1 changed files with 8 additions and 4 deletions
|
@ -173,15 +173,18 @@ int parse_fss(launch_ctxt_t *ctxt, const char *path, fss0_sept_t *sept_ctxt)
|
||||||
switch (curr_fss_cnt[i].type)
|
switch (curr_fss_cnt[i].type)
|
||||||
{
|
{
|
||||||
case CNT_TYPE_SP1:
|
case CNT_TYPE_SP1:
|
||||||
memcpy(sept_ctxt->sept_primary, content, curr_fss_cnt[i].size);
|
f_lseek(&fp, curr_fss_cnt[i].offset);
|
||||||
break;
|
f_read(&fp, sept_ctxt->sept_primary, curr_fss_cnt[i].size, NULL);
|
||||||
|
continue;
|
||||||
case CNT_TYPE_SP2:
|
case CNT_TYPE_SP2:
|
||||||
if (!memcmp(curr_fss_cnt[i].name, (sept_ctxt->kb < KB_FIRMWARE_VERSION_810) ? "septsecondary00" : "septsecondary01", 15))
|
if (!memcmp(curr_fss_cnt[i].name, (sept_ctxt->kb < KB_FIRMWARE_VERSION_810) ? "septsecondary00" : "septsecondary01", 15))
|
||||||
{
|
{
|
||||||
memcpy(sept_ctxt->sept_secondary, content, curr_fss_cnt[i].size);
|
f_lseek(&fp, curr_fss_cnt[i].offset);
|
||||||
|
f_read(&fp, sept_ctxt->sept_secondary, curr_fss_cnt[i].size, NULL);
|
||||||
sept_used = 1;
|
sept_used = 1;
|
||||||
|
goto out;
|
||||||
}
|
}
|
||||||
break;
|
continue;
|
||||||
default:
|
default:
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -191,6 +194,7 @@ int parse_fss(launch_ctxt_t *ctxt, const char *path, fss0_sept_t *sept_ctxt)
|
||||||
f_read(&fp, content, curr_fss_cnt[i].size, NULL);
|
f_read(&fp, content, curr_fss_cnt[i].size, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
out:
|
||||||
gfx_printf("Done!\n");
|
gfx_printf("Done!\n");
|
||||||
f_close(&fp);
|
f_close(&fp);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue