Commit 054abb51 authored by Jakub Kicinski's avatar Jakub Kicinski

tools: ynl: make definitions optional again

definitions are optional, commit in question breaks cli for ethtool.

Fixes: 6517a60b ("tools: ynl: move the enum classes to shared code")
Reviewed-by: default avatarChuck Lever <chuck.lever@oracle.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 0d2be75c
......@@ -387,7 +387,8 @@ class SpecFamily(SpecElement):
def resolve(self):
self.resolve_up(super())
for elem in self.yaml['definitions']:
definitions = self.yaml.get('definitions', [])
for elem in definitions:
if elem['type'] == 'enum' or elem['type'] == 'flags':
self.consts[elem['name']] = self.new_enum(elem)
else:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment