tools: ynl-gen: avoid rendering empty validate field
When dont-validate flags are filtered out for do/dump op, the list may
be empty. In that case, avoid rendering the validate field.
Fixes: fa8ba3502a
("ynl-gen-c.py: render netlink policies static for split ops")
Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Reviewed-by: Jakub Kicinski <kuba@kernel.org>
Link: https://lore.kernel.org/r/20230808090344.1368874-1-jiri@resnulli.us
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
d8c21ef7b2
commit
2c0e9f3806
|
@ -2000,6 +2000,7 @@ def print_kernel_op_table(family, cw):
|
|||
continue
|
||||
dont_validate.append(x)
|
||||
|
||||
if dont_validate:
|
||||
members.append(('validate',
|
||||
' | '.join([c_upper('genl-dont-validate-' + x)
|
||||
for x in dont_validate])), )
|
||||
|
|
Loading…
Reference in New Issue