Add hook for modifying final command line before kexecing
This commit is contained in:
1
hooks.h
1
hooks.h
@@ -44,6 +44,7 @@ int mrom_hook_has_kexec(void);
|
||||
#if MR_DEVICE_HOOKS >= 6
|
||||
void tramp_hook_encryption_setup(void);
|
||||
void tramp_hook_encryption_cleanup(void);
|
||||
void mrom_hook_fixup_full_cmdline(char *bootimg_cmdline, size_t bootimg_cmdline_cap);
|
||||
#endif
|
||||
|
||||
#endif /* MR_DEVICE_HOOKS */
|
||||
|
||||
@@ -1715,6 +1715,10 @@ int multirom_fill_kexec_android(struct multirom_status *s, struct multirom_rom *
|
||||
if(!strstr(cmdline, " mrom_kexecd=1") && sizeof(cmdline)-strlen(cmdline)-1 >= sizeof("mrom_kexecd=1"))
|
||||
strcat(cmdline, "mrom_kexecd=1");
|
||||
|
||||
#if MR_DEVICE_HOOKS >= 6
|
||||
mrom_hook_fixup_full_cmdline(cmdline, sizeof(cmdline));
|
||||
#endif
|
||||
|
||||
kexec_add_arg(kexec, cmdline);
|
||||
|
||||
res = 0;
|
||||
|
||||
Reference in New Issue
Block a user