1
0
Fork 0
mirror of https://github.com/CTCaer/hekate.git synced 2024-11-26 11:42:09 +00:00

bdk: ini: add l4t key parsing

This commit is contained in:
CTCaer 2022-12-19 05:38:03 +02:00
parent 2e989c2338
commit 0b1bb521d8
2 changed files with 5 additions and 3 deletions

View file

@ -173,14 +173,16 @@ int ini_parse(link_t *dst, char *ini_path, bool is_dir)
return 1;
}
char *ini_check_payload_section(ini_sec_t *cfg)
char *ini_check_special_section(ini_sec_t *cfg)
{
if (cfg == NULL)
return NULL;
LIST_FOREACH_ENTRY(ini_kv_t, kv, &cfg->kvs, link)
{
if (!strcmp("payload", kv->key))
if (!strcmp("l4t", kv->key))
return ((kv->val[0] == '1') ? (char *)-1 : NULL);
else if (!strcmp("payload", kv->key))
return kv->val;
}

View file

@ -44,7 +44,7 @@ typedef struct _ini_sec_t
} ini_sec_t;
int ini_parse(link_t *dst, char *ini_path, bool is_dir);
char *ini_check_payload_section(ini_sec_t *cfg);
char *ini_check_special_section(ini_sec_t *cfg);
void ini_free(link_t *src);
#endif