summaryrefslogtreecommitdiff
path: root/util/flashrom/flashrom.c
diff options
context:
space:
mode:
authorPeter Stuge <peter@stuge.se>2008-01-27 16:21:21 +0000
committerPeter Stuge <peter@stuge.se>2008-01-27 16:21:21 +0000
commite2bbcb10d1e477ce3965c5c4a0da902265239811 (patch)
treeb5c96f9cf96a20ea0b5a0a034860770b0ba574f4 /util/flashrom/flashrom.c
parent3bbf2ff789791ca6fe3eb9fc7d3c92ce1fc86367 (diff)
downloadcoreboot-e2bbcb10d1e477ce3965c5c4a0da902265239811.tar.xz
Make the vendor name optional in the -m flashrom parameter when there's only
one board name that matches. The full syntax still works, and is required when two vendors have boards with the same names. Signed-off-by: Peter Stuge <peter@stuge.se> Acked-by: Stefan Reinauer <stepan@coresystems.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3082 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/flashrom/flashrom.c')
-rw-r--r--util/flashrom/flashrom.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/util/flashrom/flashrom.c b/util/flashrom/flashrom.c
index abcd3d2684..59196bc145 100644
--- a/util/flashrom/flashrom.c
+++ b/util/flashrom/flashrom.c
@@ -196,21 +196,21 @@ int verify_flash(struct flashchip *flash, uint8_t *buf)
void usage(const char *name)
{
printf("usage: %s [-rwvEVfhR] [-c chipname] [-s exclude_start]\n", name);
- printf(" [-e exclude_end] [-m vendor:part] [-l file.layout] [-i imagename] [file]\n");
+ printf(" [-e exclude_end] [-m [vendor:]part] [-l file.layout] [-i imagename] [file]\n");
printf
- (" -r | --read: read flash and save into file\n"
- " -w | --write: write file into flash\n"
- " -v | --verify: verify flash against file\n"
- " -E | --erase: erase flash device\n"
- " -V | --verbose: more verbose output\n"
- " -c | --chip <chipname>: probe only for specified flash chip\n"
- " -s | --estart <addr>: exclude start position\n"
- " -e | --eend <addr>: exclude end postion\n"
- " -m | --mainboard <vendor:part>: override mainboard settings\n"
- " -f | --force: force write without checking image\n"
- " -l | --layout <file.layout>: read rom layout from file\n"
- " -i | --image <name>: only flash image name from flash layout\n"
- " -R | --version: print the version (release)\n"
+ (" -r | --read: read flash and save into file\n"
+ " -w | --write: write file into flash\n"
+ " -v | --verify: verify flash against file\n"
+ " -E | --erase: erase flash device\n"
+ " -V | --verbose: more verbose output\n"
+ " -c | --chip <chipname>: probe only for specified flash chip\n"
+ " -s | --estart <addr>: exclude start position\n"
+ " -e | --eend <addr>: exclude end postion\n"
+ " -m | --mainboard <[vendor:]part>: override mainboard settings\n"
+ " -f | --force: force write without checking image\n"
+ " -l | --layout <file.layout>: read rom layout from file\n"
+ " -i | --image <name>: only flash image name from flash layout\n"
+ " -R | --version: print the version (release)\n"
"\n" " If no file is specified, then all that happens"
" is that flash info is dumped.\n\n");
exit(1);
@@ -301,8 +301,8 @@ int main(int argc, char *argv[])
lb_vendor = tempstr;
lb_part = tempstr2;
} else {
- printf("warning: ignored wrong format of"
- " mainboard: %s\n", tempstr);
+ lb_vendor = NULL;
+ lb_part = tempstr;
}
break;
case 'f':