提交 6515dc23 编写于 作者: B bernard

[finsh] Add checking the result of chdir.

上级 bc0fbbfe
......@@ -189,7 +189,10 @@ int cmd_cd(int argc, char **argv)
}
else if (argc == 2)
{
chdir(argv[1]);
if (chdir(argv[1]) != 0)
{
rt_kprintf("No such directory: %s\n", argv[1]);
}
}
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册