提交 057657d8 编写于 作者: X xlfeng

resize and check userdata.img before mount

Signed-off-by: Nxlfeng <xulifeng7@huawei.com>
上级 d7f039fc
......@@ -171,8 +171,9 @@ static int DoResizeF2fs(const char* device, const unsigned long long size)
char **argv = (char **)cmd;
ret = ExecCommand(argc, argv);
} else {
unsigned long long realSize = size * ((unsigned long long)1024 * 1024 / 512);
char sizeStr[RESIZE_BUFFER_SIZE] = {0};
sprintf_s(sizeStr, RESIZE_BUFFER_SIZE, "%llu", size * 1024 * 1024 / 512);
sprintf_s(sizeStr, RESIZE_BUFFER_SIZE, "%llu", realSize);
char *cmd[] = {
file, "-s", "-t", sizeStr, (char *)device, NULL
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册