diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2009-05-15 17:02:34 +0000 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2009-05-15 17:02:34 +0000 |
commit | 515ab3de05f81253b94e7dd659f09c50724fb830 (patch) | |
tree | 5853f36678a033a13606412ac1d1d1fdc2f35b00 /flashrom.c | |
parent | 1e637844d58ed05e9b1c3fbffc5811b66bc0a0ad (diff) | |
download | ast2050-flashrom-515ab3de05f81253b94e7dd659f09c50724fb830.zip ast2050-flashrom-515ab3de05f81253b94e7dd659f09c50724fb830.tar.gz |
Refactor parts of the 3COM NIC code
Move the reusable PCI specific parts into pcidev.c, they'll be usable
for other NIC code (Realtek, VIA, ...) and also for SATA/IDE controller
cards as external programmers (for every PCI device which can program
EEPROMs basically).
Also add print_supported_pcidevs() to show the supported PCI devices
(currently only NICs, soon more) in the 'flashrom -L' output.
Corresponding to flashrom svn r515.
Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Diffstat (limited to 'flashrom.c')
-rw-r--r-- | flashrom.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -35,7 +35,6 @@ char *chip_to_probe = NULL; int exclude_start_page, exclude_end_page; int verbose = 0; int programmer = PROGRAMMER_INTERNAL; -char *nic_pcidev = NULL; const struct programmer_entry programmer_table[] = { { @@ -446,6 +445,9 @@ int main(int argc, char *argv[]) print_supported_chips(); print_supported_chipsets(); print_supported_boards(); + printf("\nSupported PCI devices flashrom can use " + "as programmer:\n\n"); + print_supported_pcidevs(nics_3com); exit(0); break; case 'p': @@ -456,7 +458,7 @@ int main(int argc, char *argv[]) } else if (strncmp(optarg, "nic3com", 7) == 0) { programmer = PROGRAMMER_NIC3COM; if (optarg[7] == '=') - nic_pcidev = strdup(optarg + 8); + pcidev_bdf = strdup(optarg + 8); } else { printf("Error: Unknown programmer.\n"); exit(1); |