diff options
Diffstat (limited to 'tools/net/ynl')
-rwxr-xr-x | tools/net/ynl/ynl-gen-c.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/net/ynl/ynl-gen-c.py b/tools/net/ynl/ynl-gen-c.py index 67bfaff05154..5bb7ca01fe51 100755 --- a/tools/net/ynl/ynl-gen-c.py +++ b/tools/net/ynl/ynl-gen-c.py @@ -80,6 +80,8 @@ class Type(SpecAttr): value = self.checks.get(limit, default) if value is None: return value + elif value in self.family.consts: + return c_upper(f"{self.family['name']}-{value}") if not isinstance(value, int): value = limit_to_number(value) return value |