dm:use acrn-dm logger function instread of fprintf

use acrn-dm logger function instread of fprintf,
this helps the stability testing log capture.

Tracked-On: #4098
Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com>
Reviewed-by: Cao Minggui <minggui.cao@intel.com>
Reviewed-by: Yin Fengwei <fengwei.yin@intel.com>
This commit is contained in:
Mingqiang Chi
2019-11-13 14:20:36 +08:00
committed by wenlingz
parent 5375a1613b
commit a59205f6a2
24 changed files with 168 additions and 227 deletions

View File

@@ -214,8 +214,7 @@ acrn_prepare_vsbl(struct vmctx *ctx)
fp = fopen(vsbl_path, "r");
if (fp == NULL) {
fprintf(stderr,
"SW_LOAD ERR: could not open vsbl file: %s\n",
pr_err("SW_LOAD ERR: could not open vsbl file: %s\n",
vsbl_path);
return -1;
}
@@ -223,8 +222,7 @@ acrn_prepare_vsbl(struct vmctx *ctx)
fseek(fp, 0, SEEK_END);
if (ftell(fp) != vsbl_size) {
fprintf(stderr,
"SW_LOAD ERR: vsbl file changed\n");
pr_err("SW_LOAD ERR: vsbl file changed\n");
fclose(fp);
return -1;
}
@@ -233,8 +231,7 @@ acrn_prepare_vsbl(struct vmctx *ctx)
read = fread(ctx->baseaddr + VSBL_TOP(ctx) - vsbl_size,
sizeof(char), vsbl_size, fp);
if (read < vsbl_size) {
fprintf(stderr,
"SW_LOAD ERR: could not read whole partition blob\n");
pr_err("SW_LOAD ERR: could not read whole partition blob\n");
fclose(fp);
return -1;
}