dm: ahci: Convert print output to acrn-dm logger
Unifies the logs to pr_* interfaces instead of printf for better log management.
Acked-by: Wang, Yu1
@@ -93,14 +93,11 @@ enum sata_fis_type {
* Debug printf
*/
#ifdef AHCI_DEBUG
-static FILE *dbg;
-#define DPRINTF(format, arg...) do { fprintf(dbg, format, ##arg); \
- fflush(dbg); } \
- while (0)
+#define DPRINTF(format, arg...) do { pr_dbg(format, ##arg); } while (0)
#else
#define DPRINTF(format, arg...)
#endif
-#define WPRINTF(format, arg...) printf(format, ##arg)
+#define WPRINTF(format, arg...) pr_err(format, ##arg)
struct ahci_ioreq {
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;
#define MAX_OPTS_LEN 256
-#ifdef AHCI_DEBUG
- dbg = fopen("/tmp/log", "w+");
-#endif
ahci_dev = calloc(1, sizeof(struct pci_ahci_vdev));
if (!ahci_dev) {
