Problem: Core dumped when I compile and run this
if (pci_attach(0) == -1)
unsigned device = 0x2411;
unsigned vendor = 0x8086; // Known device (HDD)
unsigned index = 0;
if (pci_find_device(device, vendor, index, bus, dev_func) ==
The program runs OK (ie no core dumping) if I set index = 1 but it fails to
find any device. What have I done wrong here?