Fix init dmesg logs

This commit is contained in:
topjohnwu 2022-04-08 02:38:20 -07:00
parent f639f39e79
commit 63a89d9f04

View File

@ -68,6 +68,9 @@ bool SecondStageInit::prepare() {
umount2("/proc/self/exe", MNT_DETACH); umount2("/proc/self/exe", MNT_DETACH);
umount2("/data", MNT_DETACH); umount2("/data", MNT_DETACH);
// Make sure init dmesg logs won't get messed up
argv[0] = (char *) INIT_PATH;
// Some weird devices like meizu, uses 2SI but still have legacy rootfs // Some weird devices like meizu, uses 2SI but still have legacy rootfs
// Check if root and system are on the same filesystem // Check if root and system are on the same filesystem
struct stat root{}, system{}; struct stat root{}, system{};