summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorDonald Hunter <donald.hunter@gmail.com>2024-05-28 15:06:51 +0100
committerJakub Kicinski <kuba@kernel.org>2024-05-29 18:10:26 -0700
commitcb7351ac17862cf8d4e00831ce4aa27f53bda01c (patch)
treea593c6e64b2d3520608dc7f7f0ab6615734cf7d8 /tools
parentebf9004136c76b7b62fe628a4bc88b3e894b4b95 (diff)
doc: netlink: Fix formatting of op flags in generated .rst
Generate op flags as an inline list instead of a stringified python value. Signed-off-by: Donald Hunter <donald.hunter@gmail.com> Link: https://lore.kernel.org/r/20240528140652.9445-4-donald.hunter@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/net/ynl/ynl-gen-rst.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/net/ynl/ynl-gen-rst.py b/tools/net/ynl/ynl-gen-rst.py
index 1096a71d7867..a957725b20dc 100755
--- a/tools/net/ynl/ynl-gen-rst.py
+++ b/tools/net/ynl/ynl-gen-rst.py
@@ -172,7 +172,7 @@ def parse_do_attributes(attrs: Dict[str, Any], level: int = 0) -> str:
def parse_operations(operations: List[Dict[str, Any]], namespace: str) -> str:
"""Parse operations block"""
- preprocessed = ["name", "doc", "title", "do", "dump"]
+ preprocessed = ["name", "doc", "title", "do", "dump", "flags"]
linkable = ["fixed-header", "attribute-set"]
lines = []
@@ -188,6 +188,8 @@ def parse_operations(operations: List[Dict[str, Any]], namespace: str) -> str:
if key in linkable:
value = rst_ref(namespace, key, value)
lines.append(rst_fields(key, value, 0))
+ if 'flags' in operation:
+ lines.append(rst_fields('flags', rst_list_inline(operation['flags'])))
if "do" in operation:
lines.append(rst_paragraph(":do:", 0))