summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2021-12-24 14:52:44 +0900
committerLuca Boccassi <luca.boccassi@gmail.com>2021-12-24 10:18:11 +0000
commit34b56848467a0348b724148fe3e0d9080eb56402 (patch)
tree7b01b1e07ed3f0ffd716e33bee8479d1c89ff3cf /tools
parent0764e3a327573e7bda2f0e1a914f28482ab00574 (diff)
downloadsystemd-34b56848467a0348b724148fe3e0d9080eb56402.tar.gz
man: also add anotations for methods
Fixes #21882.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/update-dbus-docs.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/update-dbus-docs.py b/tools/update-dbus-docs.py
index 397d131be8..473469e457 100755
--- a/tools/update-dbus-docs.py
+++ b/tools/update-dbus-docs.py
@@ -47,6 +47,14 @@ def print_method(declarations, elem, *, prefix, file, is_signal=False):
klass = 'signal' if is_signal else 'method'
declarations[klass].append(name)
+ # @org.freedesktop.systemd1.Privileged("true")
+ # SetShowStatus(in s mode);
+
+ for anno in elem.findall('./annotation'):
+ anno_name = anno.get('name')
+ anno_value = anno.get('value')
+ print(f'''{prefix}@{anno_name}("{anno_value}")''', file=file)
+
print(f'''{prefix}{name}(''', file=file, end='')
lead = ',\n' + prefix + ' ' * len(name) + ' '