init : add sleep cmd

Signed-off-by: zhong_ning <zhong_ning@hoperun.com>
This commit is contained in:
zhong_ning 2021-07-23 17:43:16 +08:00
parent 869e24068c
commit 33f138fb00

View File

@ -292,7 +292,7 @@ static void DoSleep(const char *cmdContent)
}
errno = 0;
unsigned long sleepTime = stroul(ctx->argv[0], NULL, 10);
unsigned long sleepTime = strtoul(ctx->argv[0], NULL, 10);
if (errno != 0) {
INIT_LOGE("cannot covert sleep time in command \" sleep \"");
goto out;