hekate/nyx: constify more args

This commit is contained in:
CTCaer
2024-10-04 22:09:06 +03:00
parent c422d63b64
commit 7b60c3d162
10 changed files with 15 additions and 15 deletions

View File

@@ -31,7 +31,7 @@
extern hekate_config h_cfg;
extern bool is_ipl_updated(void *buf, char *path, bool force);
extern bool is_ipl_updated(void *buf, const char *path, bool force);
// FSS0 Magic and Meta header offset.
#define FSS0_MAGIC 0x30535346

View File

@@ -170,7 +170,7 @@ static void parse_external_kip_patches()
ext_patches_parsed = true;
}
const pkg2_kernel_id_t *pkg2_identify(u8 *hash)
const pkg2_kernel_id_t *pkg2_identify(const u8 *hash)
{
for (u32 i = 0; i < ARRAY_SIZE(_pkg2_kernel_ids); i++)
{

View File

@@ -159,7 +159,7 @@ void pkg2_merge_kip(link_t *info, pkg2_kip1_t *kip1);
void pkg2_get_ids(kip1_id_t **ids, u32 *entries);
const char *pkg2_patch_kips(link_t *info, char *patch_names);
const pkg2_kernel_id_t *pkg2_identify(u8 *hash);
const pkg2_kernel_id_t *pkg2_identify(const u8 *hash);
pkg2_hdr_t *pkg2_decrypt(void *data, u8 kb, bool is_exo);
void pkg2_build_encrypt(void *dst, void *hos_ctxt, link_t *kips_info, bool is_exo);

View File

@@ -95,7 +95,7 @@ static ini_kip_sec_t *_ini_create_kip_section(link_t *dst, ini_kip_sec_t *ksec,
return ksec;
}
int ini_patch_parse(link_t *dst, char *ini_path)
int ini_patch_parse(link_t *dst, const char *ini_path)
{
FIL fp;
u32 lblen;
@@ -154,15 +154,15 @@ int ini_patch_parse(link_t *dst, char *ini_path)
pt->length = strtol(&lbuf[pos], NULL, 16);
pos += str_start + 1;
u8 *buf = malloc(pt->length * 2);
u8 *data = malloc(pt->length * 2);
// Set patch source data.
str_start = _find_patch_section_name(&lbuf[pos], lblen - pos, ',');
pt->src_data = _htoa(NULL, &lbuf[pos], pt->length, buf);
pt->src_data = _htoa(NULL, &lbuf[pos], pt->length, data);
pos += str_start + 1;
// Set patch destination data.
pt->dst_data = _htoa(NULL, &lbuf[pos], pt->length, buf + pt->length);
pt->dst_data = _htoa(NULL, &lbuf[pos], pt->length, data + pt->length);
}
list_append(&ksec->pts, &pt->link);

View File

@@ -37,6 +37,6 @@ typedef struct _ini_kip_sec_t
link_t link;
} ini_kip_sec_t;
int ini_patch_parse(link_t *dst, char *ini_path);
int ini_patch_parse(link_t *dst, const char *ini_path);
#endif