1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-07-02 06:23:18 +02:00

Refactor PCI and USB device status printing

To be able to get rid of lots of #ifdefs and centralize programmer-specific
data more...
 - introduce two new fields to struct programmer_entry, namely
   enum type (OTHER, USB, PCI) and union devs (pcidev_status, usbdev_status
   or char *note).
 - use those fields to generate device listings in print.c and print_wiki.c.

Bonus: add printing of USB devices to print_wiki.c and count supported PCI
and USB devices.

Corresponding to flashrom svn r1631.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
This commit is contained in:
Stefan Tauner
2012-12-27 18:40:26 +00:00
parent a6d9648017
commit af358d6af2
6 changed files with 228 additions and 193 deletions

View File

@ -482,17 +482,4 @@ static int ft2232_spi_send_command(struct flashctx *flash,
return failed ? -1 : 0;
}
void print_supported_usbdevs(const struct usbdev_status *devs)
{
int i;
msg_pinfo("USB devices:\n");
for (i = 0; devs[i].vendor_name != NULL; i++) {
msg_pinfo("%s %s [%04x:%04x]%s\n", devs[i].vendor_name,
devs[i].device_name, devs[i].vendor_id,
devs[i].device_id,
(devs[i].status == NT) ? " (untested)" : "");
}
}
#endif