提交 7173a750 编写于 作者: Z zhong_ning

fix bug

Signed-off-by: Nzhong_ning <zhong_ning@hoperun.com>
上级 38f26edf
......@@ -44,7 +44,7 @@
#define MAX_BUFFER 256
#define MAX_EACH_CMD_LENGTH 30
#define MAX_JSON_FILE_LEN 102400 // max init.cfg size 100KB
#define CONVERT_MICROSEC_TO_SEC(x) ((x) / 1000 / 1000)
#define CONVERT_MICROSEC_TO_SEC(x) ((x) / 1000 / 1000.0)
struct CmdArgs* GetCmd(const char *cmdContent, const char *delim)
{
......@@ -194,7 +194,7 @@ void WaitForFile(const char *source, unsigned int maxCount)
count++;
} while ((stat(source, &sourceInfo) < 0) && (errno == ENOENT) && (count < maxCount));
if (count == maxCount) {
INIT_LOGE("wait for file:%s failed after %d.\n", source, maxCount * CONVERT_MICROSEC_TO_SEC(waitTime));
INIT_LOGE("wait for file:%s failed after %f.\n", source, maxCount * CONVERT_MICROSEC_TO_SEC(waitTime));
}
return;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册