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

Refine -L output to include all programmer modules

Flashrom -L output did not contain a list of programmers nor were
all programmers listed. Fix it and mention at least the name of each
programmer. Wiki output is unchanged, and will need separate fixups.

Corresponding to flashrom svn r1199.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
This commit is contained in:
Carl-Daniel Hailfinger
2010-10-06 23:48:34 +00:00
parent f992c19fca
commit a73fb4983d
7 changed files with 112 additions and 56 deletions

View File

@ -33,11 +33,6 @@
static void cli_classic_usage(const char *name)
{
const char *pname;
int pnamelen;
int remaining = 0;
enum programmer p;
printf("Usage: flashrom [-n] [-V] [-f] [-h|-R|-L|"
#if CONFIG_PRINT_WIKI == 1
"-z|"
@ -83,32 +78,9 @@ static void cli_classic_usage(const char *name)
"in wiki syntax\n"
#endif
" -p | --programmer <name>[:<param>] specify the programmer "
"device");
for (p = 0; p < PROGRAMMER_INVALID; p++) {
pname = programmer_table[p].name;
pnamelen = strlen(pname);
if (remaining - pnamelen - 2 < 0) {
printf("\n ");
remaining = 43;
} else {
printf(" ");
remaining--;
}
if (p == 0) {
printf("(");
remaining--;
}
printf("%s", pname);
remaining -= pnamelen;
if (p < PROGRAMMER_INVALID - 1) {
printf(",");
remaining--;
} else {
printf(")\n");
}
}
"device\n");
list_programmers_linebreak(37, 80, 1);
printf("\nYou can specify one of -h, -R, -L, "
#if CONFIG_PRINT_WIKI == 1
"-z, "