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

@@ -159,7 +159,7 @@ is_pci_gvt(struct pci_vdev *dev)
static void
pci_parse_slot_usage(char *aopt)
{
fprintf(stderr, "Invalid PCI slot info field \"%s\"\n", aopt);
pr_err("Invalid PCI slot info field \"%s\"\n", aopt);
}
int
@@ -863,7 +863,7 @@ pci_emul_init(struct vmctx *ctx, struct pci_vdev_ops *ops, int bus, int slot,
pdi = calloc(1, sizeof(struct pci_vdev));
if (!pdi) {
fprintf(stderr, "%s: calloc returns NULL\n", __func__);
pr_err("%s: calloc returns NULL\n", __func__);
return -1;
}
@@ -2439,7 +2439,7 @@ pci_get_vdev_info(int slot)
if (si != NULL)
dev = si->si_funcs[0].fi_devi;
else
fprintf(stderr, "slot=%d is empty!\n", slot);
pr_err("slot=%d is empty!\n", slot);
return dev;
}