From 61599059d5dd76d3994a33edaf8e2e77c5455bac Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Thu, 3 Sep 2020 19:17:25 -0700 Subject: [PATCH] Fix typo for SAR first stage init --- native/jni/init/twostage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/native/jni/init/twostage.cpp b/native/jni/init/twostage.cpp index 7abbdb510..fe5e04ee8 100644 --- a/native/jni/init/twostage.cpp +++ b/native/jni/init/twostage.cpp @@ -145,7 +145,7 @@ void SARFirstStageInit::prepare() { int src = xopen("/init", O_RDONLY); int dest = xopen("/dev/init", O_CREAT | O_WRONLY, 0); { - auto init = raw_data::read(dest); + auto init = raw_data::read(src); init.patch({ make_pair(INIT_PATH, REDIR_PATH) }); write(dest, init.buf, init.sz); fclone_attr(src, dest);