#define PT_LOGGING_ENABLED
#ifdef PT_LOGGING_ENABLED
-#define PT_LOG(_f, _a...) fprintf(logfile, "%s: " _f, __func__, ##_a)
+#define PT_LOG(_f, _a...) fprintf(stdout, "%s: " _f, __func__, ##_a)
#else
#define PT_LOG(_f, _a...)
#endif
data = get_msi_gdata(d);
addr = get_msi_gaddr(d);
- PT_LOG("old_data %x old_addr %lx data %x addr %lx\n",
+ PT_LOG("old_data %x old_addr %"PRIx64" data %x addr %"PRIx64"\n",
old_data, old_addr, data, addr);
if ( data != old_data || addr != old_addr )
if ( addr % 4 )
{
- PT_LOG("unaligned dword access to MSI-X table, addr %016lx\n",
+ PT_LOG("unaligned dword access to MSI-X table, addr %016"PRIx64"\n",
addr);
return;
}
if ( addr % 4 )
{
- PT_LOG("unaligned dword access to MSI-X table, addr %016lx\n",
+ PT_LOG("unaligned dword access to MSI-X table, addr %016"PRIx64"\n",
addr);
return 0;
}
bar_base &= ~0xf;
bar_base += (uint64_t)pci_read_long(pd, 0x10 + 4 * (bar_index + 1)) << 32;
}
- PT_LOG("get MSI-X table bar base %lx\n", bar_base);
+ PT_LOG("get MSI-X table bar base %"PRIx64"\n", bar_base);
dev->msix->fd = open("/dev/mem", O_RDWR);
dev->msix->phys_iomem_base = mmap(0, total_entries * 16,