未验证 提交 3b953ee6 编写于 作者: O openharmony_ci 提交者: Gitee

!1858 【轻量级 PR】:[revert] adjust "CloseStdio" position adapt updater

Merge pull request !1858 from 许云通/N/A
......@@ -124,7 +124,6 @@ static void EnableDevKmsg(void)
void LogInit(void)
{
CloseStdio();
int ret = mknod("/dev/kmsg", S_IFCHR | S_IWUSR | S_IRUSR,
makedev(MEM_MAJOR, DEV_KMSG_MINOR));
if (ret == 0) {
......@@ -194,7 +193,6 @@ static void StartInitSecondStage(void)
INIT_LOGE("Mount required partitions failed; please check fstab file");
// Execute sh for debugging
#ifndef STARTUP_INIT_TEST
OpenConsole();
execv("/bin/sh", NULL);
abort();
#endif
......@@ -205,6 +203,8 @@ static void StartInitSecondStage(void)
ReleaseFstab(fstab);
fstab = NULL;
}
// It will panic if close stdio before execv("/bin/sh", NULL)
CloseStdio();
INIT_LOGI("Start init second stage.");
SwitchRoot("/usr");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册