projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
523d3cc
)
ynl: skip rendering attributes with header property in uapi mode
author
Stanislav Fomichev
<sdf@fomichev.me>
Wed, 4 Dec 2024 15:55:43 +0000
(07:55 -0800)
committer
Jakub Kicinski
<kuba@kernel.org>
Thu, 5 Dec 2024 20:03:04 +0000
(12:03 -0800)
To allow omitting some of the attributes in the final generated file.
Signed-off-by: Stanislav Fomichev <sdf@fomichev.me>
Link:
https://patch.msgid.link/20241204155549.641348-3-sdf@fomichev.me
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/net/ynl/ynl-gen-c.py
patch
|
blob
|
blame
|
history
diff --git
a/tools/net/ynl/ynl-gen-c.py
b/tools/net/ynl/ynl-gen-c.py
index bfe95826ae3e48f161a9fcc45710b7e75faf9451..79829ce39139b88f92294139c369a011c17444a5 100755
(executable)
--- a/
tools/net/ynl/ynl-gen-c.py
+++ b/
tools/net/ynl/ynl-gen-c.py
@@
-801,6
+801,7
@@
class EnumSet(SpecEnumSet):
self.user_type = 'int'
self.value_pfx = yaml.get('name-prefix', f"{family.ident_name}-{yaml['name']}-")
+ self.header = yaml.get('header', None)
self.enum_cnt_name = yaml.get('enum-cnt-name', None)
super().__init__(family, yaml)
@@
-2441,6
+2442,9
@@
def render_uapi(family, cw):
if const['type'] == 'enum' or const['type'] == 'flags':
enum = family.consts[const['name']]
+ if enum.header:
+ continue
+
if enum.has_doc():
if enum.has_entry_doc():
cw.p('/**')