diff options
author | Christian Ruppert <spooky85@gmail.com> | 2009-05-14 18:57:26 +0000 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2009-05-14 18:57:26 +0000 |
commit | 0cdb0313f171d80b13f02014ad4987b84c935a83 (patch) | |
tree | 3dea3b3bf5e588ca0afd0d76aab57f65ab0b8f06 /flashrom.c | |
parent | c2a9c9c5fd791d8fb2a85e726b80f44f2b28759e (diff) | |
download | ast2050-flashrom-0cdb0313f171d80b13f02014ad4987b84c935a83.zip ast2050-flashrom-0cdb0313f171d80b13f02014ad4987b84c935a83.tar.gz |
nic3com: allow selection of a particular PCI device to use as programmer
Add support for users to specify a certain NIC via PCI bus:slot.func
notation, in case there are multiple NICs in one system.
Usage: flashrom -p nic3com=bb:ss.f
Corresponding to flashrom svn r510.
Signed-off-by: Christian Ruppert <spooky85@gmail.com>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
Diffstat (limited to 'flashrom.c')
-rw-r--r-- | flashrom.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -35,6 +35,7 @@ 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[] = { { @@ -454,6 +455,8 @@ int main(int argc, char *argv[]) programmer = PROGRAMMER_DUMMY; } else if (strncmp(optarg, "nic3com", 7) == 0) { programmer = PROGRAMMER_NIC3COM; + if (optarg[7] == '=') + nic_pcidev = strdup(optarg + 8); } else { printf("Error: Unknown programmer.\n"); exit(1); |