mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-29 07:04:10 +08:00
tools: ynl: make definitions optional again
definitions are optional, commit in question breaks cli for ethtool.
Fixes: 6517a60b03
("tools: ynl: move the enum classes to shared code")
Reviewed-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
0d2be75ce7
commit
054abb515f
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user