dm:replace perror with pr_err

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

Tracked-On: #4098
Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com>
This commit is contained in:
Mingqiang Chi
2020-01-06 16:08:46 +08:00
committed by wenlingz
parent 0e47f0a8f9
commit 5267a9775c
10 changed files with 45 additions and 44 deletions

View File

@@ -696,7 +696,7 @@ blockif_open(const char *optstr, const char *ident)
bc = calloc(1, sizeof(struct blockif_ctxt));
if (bc == NULL) {
perror("calloc");
pr_err("calloc");
goto err;
}
@@ -750,7 +750,7 @@ blockif_open(const char *optstr, const char *ident)
for (i = 0; i < BLOCKIF_NUMTHR; i++) {
if (snprintf(tname, sizeof(tname), "blk-%s-%d",
ident, i) >= sizeof(tname)) {
perror("blk thread name too long");
pr_err("blk thread name too long");
}
pthread_create(&bc->btid[i], NULL, blockif_thr, bc);
pthread_setname_np(bc->btid[i], tname);