Fix typo for SAR first stage init

This commit is contained in:
topjohnwu 2020-09-03 19:17:25 -07:00
parent f32a29911b
commit 61599059d5

View File

@ -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);