[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240528140652.9445-4-donald.hunter@gmail.com>
Date: Tue, 28 May 2024 15:06:51 +0100
From: Donald Hunter <donald.hunter@...il.com>
To: netdev@...r.kernel.org,
Jakub Kicinski <kuba@...nel.org>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Paolo Abeni <pabeni@...hat.com>,
Jiri Pirko <jiri@...nulli.us>,
Breno Leitao <leitao@...ian.org>,
Arkadiusz Kubalewski <arkadiusz.kubalewski@...el.com>,
Vadim Fedorenko <vadim.fedorenko@...ux.dev>
Cc: donald.hunter@...hat.com,
Donald Hunter <donald.hunter@...il.com>
Subject: [PATCH net-next v1 3/4] 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@...il.com>
---
tools/net/ynl/ynl-gen-rst.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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))
--
2.44.0
Powered by blists - more mailing lists