tools: ynl: Handle byte-order in struct members

Add support for byte-order in struct members in the genetlink-legacy
spec.

Signed-off-by: Donald Hunter <donald.hunter@gmail.com>
Acked-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Donald Hunter
2023-05-23 10:37:48 +01:00
committed by David S. Miller
parent 7c2435ef76
commit bddd2e561b
3 changed files with 8 additions and 4 deletions

View File

@@ -226,11 +226,13 @@ class SpecStructMember(SpecElement):
Represents a single struct member attribute.
Attributes:
type string, type of the member attribute
type string, type of the member attribute
byte_order string or None for native byte order
"""
def __init__(self, family, yaml):
super().__init__(family, yaml)
self.type = yaml['type']
self.byte_order = yaml.get('byte-order')
class SpecStruct(SpecElement):