9
0
Fork 0

parameters: only show possible enumerations if there are any

Enumeration values will only be shown if there are at least two of them.
With only one enumeration, it was just repeating what was previously printed
anyway.

Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Holger Schurig 2014-05-30 11:07:30 +02:00 committed by Sascha Hauer
parent 287c03267e
commit 9b57fd27f5
1 changed files with 3 additions and 0 deletions

View File

@ -362,6 +362,9 @@ static void param_enum_info(struct param_d *p)
struct param_enum *pe = to_param_enum(p);
int i;
if (pe->num_names <= 1)
return;
printf(" (");
for (i = 0; i < pe->num_names; i++) {