Skip to content

Commit

Permalink
doc: netlink: Fix op pre and post fields in generated .rst
Browse files Browse the repository at this point in the history
The generated .rst has pre and post headings without any values, e.g.
here:

https://docs.kernel.org/6.9/networking/netlink_spec/dpll.html#device-id-get

Emit keys and values in the generated .rst

Signed-off-by: Donald Hunter <donald.hunter@gmail.com>
Link: https://lore.kernel.org/r/20240528140652.9445-5-donald.hunter@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
donaldh authored and kuba-moo committed May 30, 2024
1 parent cb7351a commit 9104fee
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tools/net/ynl/ynl-gen-rst.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,10 @@ def parse_do(do_dict: Dict[str, Any], level: int = 0) -> str:
lines = []
for key in do_dict.keys():
lines.append(rst_paragraph(bold(key), level + 1))
lines.append(parse_do_attributes(do_dict[key], level + 1) + "\n")
if key in ['request', 'reply']:
lines.append(parse_do_attributes(do_dict[key], level + 1) + "\n")
else:
lines.append(headroom(level + 2) + do_dict[key] + "\n")

return "\n".join(lines)

Expand Down

0 comments on commit 9104fee

Please sign in to comment.