linux-stable/tools/net/ynl
Jakub Kicinski f7cf644796 tools: ynl-gen: fix single attribute structs with attr 0 only
Chuck run into an issue with a single-element attr-set which
only has an attr with value of 0. The search for max attr in
a struct records attrs with value larger than 0 only (max_val
is set to 0 at the start). Adjust the comparison, alternatively
max_val could be init'ed to -1. Somehow picking the last attr
of a value seems like a good idea in general.

Reported-by: Chuck Lever III <chuck.lever@oracle.com>
Fixes: be5bea1cc0 ("net: add basic C code generators for Netlink")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-02-24 11:55:47 -08:00
..
lib tools: ynl: load jsonschema on demand 2023-01-31 20:36:03 -08:00
cli.py tools: net: use python3 explicitly 2023-01-31 20:36:03 -08:00
ynl-gen-c.py tools: ynl-gen: fix single attribute structs with attr 0 only 2023-02-24 11:55:47 -08:00
ynl-regen.sh