tools:acrn-crashlog: check blocks size instead of file size

What acrnprobe really care about is the storage capacity taken up from
emmc. This patch checks all the logs' blocks size instead of the file
size before collecting new logs.

Tracked-On: #1024
Signed-off-by: Liu, Xinwu <xinwu.liu@intel.com>
Reviewed-by: Liu, Xiaojing <xiaojing.liu@intel.com>
Acked-by: Chen, Gang <gang.c.chen@intel.com>
This commit is contained in:
Liu, Xinwu
2019-04-19 10:25:10 +08:00
committed by ACRN System Integration
parent fa1216325b
commit 13d50c2296
3 changed files with 24 additions and 9 deletions

View File

@@ -57,7 +57,8 @@ static int crashlog_check_space(void)
if (!space_available(crashlog->outdir, quota))
return -1;
if (dir_size(crashlog->outdir, crashlog->outdir_len, &dsize) == -1) {
if (dir_blocks_size(crashlog->outdir, crashlog->outdir_len,
&dsize) == -1) {
LOGE("failed to check outdir size\n");
return -1;
}