未验证 提交 72e6572d 编写于 作者: 许云通 提交者: Gitee

adjust "CloseStdio" position adapt updater

Signed-off-by: N许云通 <scorpion_xyt@outlook.com>
上级 c0e8235c
......@@ -124,6 +124,7 @@ 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) {
......@@ -193,6 +194,7 @@ 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
......@@ -203,8 +205,6 @@ 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.
先完成此消息的编辑!
想要评论请 注册