@@ -1555,24 +1555,16 @@ int multirom_get_bootloader_cmdline(struct multirom_status *s, char *str, size_t
1555
1555
l = (char * )hdr .cmdline ;
1556
1556
hdr .cmdline [BOOT_ARGS_SIZE - 1 ] = 0 ;
1557
1557
1558
- #ifdef FLO_CMDLINE_HACK
1559
- // Flo's bootloader (at least 03.15) removes first 26 characters
1560
- // from boot.img's cmdline because of reasons. On stock
1561
- // boot.img, those 26 characters are "console=ttyHSL0,115200,n8 "
1562
- l += 26 ;
1563
- #endif
1564
-
1565
1558
#if MR_DEVICE_HOOKS >= 5
1566
- if ( mrom_hook_cmdline_remove_bootimg_part ( l , BOOT_ARGS_SIZE , str , size ) != 1 )
1559
+ mrom_hook_fixup_bootimg_cmdline ( l , BOOT_ARGS_SIZE );
1567
1560
#endif
1561
+
1562
+ if (* l != 0 && (c = strstr (str , l )))
1568
1563
{
1569
- if (* l != 0 && (c = strstr (str , l )))
1570
- {
1571
- e = c + strlen (l );
1572
- if (* e == ' ' )
1573
- ++ e ;
1574
- memmove (c , e , strlen (e )+ 1 ); // plus NULL
1575
- }
1564
+ e = c + strlen (l );
1565
+ if (* e == ' ' )
1566
+ ++ e ;
1567
+ memmove (c , e , strlen (e )+ 1 ); // plus NULL
1576
1568
}
1577
1569
}
1578
1570
@@ -1717,11 +1709,11 @@ int multirom_fill_kexec_android(struct multirom_status *s, struct multirom_rom *
1717
1709
img .hdr .cmdline [BOOT_ARGS_SIZE - 1 ] = 0 ;
1718
1710
1719
1711
// see multirom_get_bootloader_cmdline
1720
- #ifdef FLO_CMDLINE_HACK
1721
- strcat (cmdline , (char * )img .hdr .cmdline + 26 );
1722
- #else
1723
- strcat (cmdline , (char * )img .hdr .cmdline );
1712
+ #if MR_DEVICE_HOOKS >= 5
1713
+ mrom_hook_fixup_bootimg_cmdline ((char * )img .hdr .cmdline , BOOT_ARGS_SIZE );
1724
1714
#endif
1715
+
1716
+ strcat (cmdline , (char * )img .hdr .cmdline );
1725
1717
strcat (cmdline , " " );
1726
1718
}
1727
1719
0 commit comments