mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 20:51:03 +02:00
tools: ynl: Support enums in struct members in genetlink-legacy
Support decoding scalars as enums in struct members for genetlink-legacy specs. Signed-off-by: Donald Hunter <donald.hunter@gmail.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
5ac18889bd
commit
313a7a808c
@@ -412,7 +412,11 @@ class YnlFamily(SpecFamily):
|
||||
|
||||
def _decode_binary(self, attr, attr_spec):
|
||||
if attr_spec.struct_name:
|
||||
decoded = attr.as_struct(self.consts[attr_spec.struct_name])
|
||||
members = self.consts[attr_spec.struct_name]
|
||||
decoded = attr.as_struct(members)
|
||||
for m in members:
|
||||
if m.enum:
|
||||
self._decode_enum(decoded, m)
|
||||
elif attr_spec.sub_type:
|
||||
decoded = attr.as_c_array(attr_spec.sub_type)
|
||||
else:
|
||||
|
Reference in New Issue
Block a user