1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-06-30 21:52:36 +02:00

Change programmer options separator from = to :

Current programmer parameter syntax is -p programmer=parameter
Unfortunately, many parameters are of the form variable=val, so we get
commandlines like this.

flashrom -p it87spi=port=0x820 and this looks horrible.

Using : instead of = would make such parameters look better: flashrom -p
it87spi:port=0x820

As a side benefit, this patch mentions the programmer name in the error
message if it is unknown.

Corresponding to flashrom svn r693.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
This commit is contained in:
Carl-Daniel Hailfinger
2009-08-19 15:03:28 +00:00
parent 8ab49e72af
commit 664e7ad995
2 changed files with 10 additions and 10 deletions

View File

@ -708,7 +708,7 @@ int main(int argc, char *argv[])
namelen = strlen(name);
if (strncmp(optarg, name, namelen) == 0) {
switch (optarg[namelen]) {
case '=':
case ':':
programmer_param = strdup(optarg + namelen + 1);
break;
case '\0':
@ -725,7 +725,7 @@ int main(int argc, char *argv[])
}
}
if (programmer == PROGRAMMER_INVALID) {
printf("Error: Unknown programmer.\n");
printf("Error: Unknown programmer %s.\n", optarg);
exit(1);
}
break;