Add hook for modifying final command line before kexecing

This commit is contained in:
Zhuowei Zhang
2016-02-11 18:13:55 -08:00
parent 057bad16c7
commit 426a08bc94
2 changed files with 5 additions and 0 deletions

View File

@@ -44,6 +44,7 @@ int mrom_hook_has_kexec(void);
#if MR_DEVICE_HOOKS >= 6 #if MR_DEVICE_HOOKS >= 6
void tramp_hook_encryption_setup(void); void tramp_hook_encryption_setup(void);
void tramp_hook_encryption_cleanup(void); void tramp_hook_encryption_cleanup(void);
void mrom_hook_fixup_full_cmdline(char *bootimg_cmdline, size_t bootimg_cmdline_cap);
#endif #endif
#endif /* MR_DEVICE_HOOKS */ #endif /* MR_DEVICE_HOOKS */

View File

@@ -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")) if(!strstr(cmdline, " mrom_kexecd=1") && sizeof(cmdline)-strlen(cmdline)-1 >= sizeof("mrom_kexecd=1"))
strcat(cmdline, "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); kexec_add_arg(kexec, cmdline);
res = 0; res = 0;