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:
parent
287c03267e
commit
9b57fd27f5
|
@ -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++) {
|
||||
|
|
Loading…
Reference in New Issue