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

@@ -639,7 +639,7 @@ virtio_net_parsemac(char *mac_str, uint8_t *mac_addr)
if (ea == NULL || ETHER_IS_MULTICAST(ea->ether_addr_octet) ||
memcmp(ea->ether_addr_octet, zero_addr, ETHER_ADDR_LEN)
== 0) {
fprintf(stderr, "Invalid MAC %s\n", mac_str);
pr_err("Invalid MAC %s\n", mac_str);
return -1;
}
memcpy(mac_addr, ea->ether_addr_octet, ETHER_ADDR_LEN);
@@ -998,7 +998,7 @@ virtio_net_teardown(void *param)
close(net->tapfd);
net->tapfd = -1;
} else
fprintf(stderr, "net->tapfd is -1!\n");
pr_err("net->tapfd is -1!\n");
free(net);
}
@@ -1027,7 +1027,7 @@ virtio_net_deinit(struct vmctx *ctx, struct pci_vdev *dev, char *opts)
DPRINTF(("%s: done\n", __func__));
} else
fprintf(stderr, "%s: NULL!\n", __func__);
pr_err("%s: NULL!\n", __func__);
}
static struct vhost_net *