Compare commits

...

3 Commits

Author SHA1 Message Date
Oliver Smith 347924cc08 d/changelog: add 1.0.1 2022-05-16 10:50:40 +02:00
Oliver Smith 313de8d95e Exit with error if no device was found 2022-05-16 10:45:52 +02:00
Oliver Smith 1bf48da7a8 Fix missing pci_fill_info()
Before reading vendor_id or device_id from struct pci_dev, one must call
pci_fill_info() first. It looks like this had worked with previous
libpci versions, but with libpci 3.7.0 on debian 11 this patch is needed
or else the tool stops at 'starting bus iteration' without finding the
device.

Fixes: SYS#5956
2022-05-16 10:42:08 +02:00
2 changed files with 10 additions and 0 deletions

7
debian/changelog vendored
View File

@ -1,3 +1,10 @@
rtl8168-eeprom (1.0.1) unstable; urgency=medium
* Fix missing pci_fill_info()
* Exit with error if no device was found
-- Oliver Smith <osmith@sysmocom.de> Mon, 16 May 2022 10:49:48 +0200
rtl8168-eeprom (1.0.0) unstable; urgency=medium
* Initial debian packaging.

View File

@ -466,6 +466,7 @@ static void iterate_devices(struct pci_access *pa, char *filter_id, char *filter
continue;
/* our own clumsy implementation of filtering */
pci_fill_info(p, PCI_FILL_IDENT);
if (p->vendor_id != 0x10ec || p->device_id != 0x8168)
continue;
@ -497,6 +498,8 @@ static void iterate_devices(struct pci_access *pa, char *filter_id, char *filter
if (new_mac)
exit(0);
}
die("no matching device found!\n");
}
int main(int argc, char **argv)