diff --git a/devicemodel/hw/pci/ahci.c b/devicemodel/hw/pci/ahci.c index b5c89db1b..56a7bf521 100644 --- a/devicemodel/hw/pci/ahci.c +++ b/devicemodel/hw/pci/ahci.c @@ -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) {