dm: ahci: Convert print output to acrn-dm logger
Unifies the logs to pr_* interfaces instead of printf for better log management. Tracked-On: #5267 Signed-off-by: Sun Peng <peng.p.sun@intel.com> Reviewed-by: Chi Mingqiang <mingqiang.chi@intel.com> Acked-by: Wang, Yu1 <yu1.wang@intel.com>
This commit is contained in:
parent
00a739cf32
commit
72dbac0448
|
@ -93,14 +93,11 @@ enum sata_fis_type {
|
||||||
* Debug printf
|
* Debug printf
|
||||||
*/
|
*/
|
||||||
#ifdef AHCI_DEBUG
|
#ifdef AHCI_DEBUG
|
||||||
static FILE *dbg;
|
#define DPRINTF(format, arg...) do { pr_dbg(format, ##arg); } while (0)
|
||||||
#define DPRINTF(format, arg...) do { fprintf(dbg, format, ##arg); \
|
|
||||||
fflush(dbg); } \
|
|
||||||
while (0)
|
|
||||||
#else
|
#else
|
||||||
#define DPRINTF(format, arg...)
|
#define DPRINTF(format, arg...)
|
||||||
#endif
|
#endif
|
||||||
#define WPRINTF(format, arg...) printf(format, ##arg)
|
#define WPRINTF(format, arg...) pr_err(format, ##arg)
|
||||||
|
|
||||||
struct ahci_ioreq {
|
struct ahci_ioreq {
|
||||||
struct blockif_req io_req;
|
struct blockif_req io_req;
|
||||||
|
@ -2352,9 +2349,6 @@ pci_ahci_init(struct vmctx *ctx, struct pci_vdev *dev, char *opts, int atapi)
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
#define MAX_OPTS_LEN 256
|
#define MAX_OPTS_LEN 256
|
||||||
#ifdef AHCI_DEBUG
|
|
||||||
dbg = fopen("/tmp/log", "w+");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
ahci_dev = calloc(1, sizeof(struct pci_ahci_vdev));
|
ahci_dev = calloc(1, sizeof(struct pci_ahci_vdev));
|
||||||
if (!ahci_dev) {
|
if (!ahci_dev) {
|
||||||
|
|
Loading…
Reference in New Issue