1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-22 17:35:35 +03:00

man: also add anotations for methods

Fixes #21882.
This commit is contained in:
Yu Watanabe 2021-12-24 14:52:44 +09:00 committed by Luca Boccassi
parent 0764e3a327
commit 34b5684846
5 changed files with 40 additions and 0 deletions

View File

@ -63,8 +63,10 @@ node /org/freedesktop/home1 {
out b incomplete,
out o bus_path);
ListHomes(out a(susussso) home_areas);
@org.freedesktop.systemd1.Privileged("true")
ActivateHome(in s user_name,
in s secret);
@org.freedesktop.systemd1.Privileged("true")
DeactivateHome(in s user_name);
RegisterHome(in s user_record);
UnregisterHome(in s user_name);
@ -72,6 +74,7 @@ node /org/freedesktop/home1 {
RealizeHome(in s user_name,
in s secret);
RemoveHome(in s user_name);
@org.freedesktop.systemd1.Privileged("true")
FixateHome(in s user_name,
in s secret);
AuthenticateHome(in s user_name,
@ -83,19 +86,26 @@ node /org/freedesktop/home1 {
ChangePasswordHome(in s user_name,
in s new_secret,
in s old_secret);
@org.freedesktop.systemd1.Privileged("true")
LockHome(in s user_name);
@org.freedesktop.systemd1.Privileged("true")
UnlockHome(in s user_name,
in s secret);
AcquireHome(in s user_name,
in s secret,
in b please_suspend,
out h send_fd);
@org.freedesktop.systemd1.Privileged("true")
RefHome(in s user_name,
in b please_suspend,
out h send_fd);
@org.freedesktop.systemd1.Privileged("true")
ReleaseHome(in s user_name);
@org.freedesktop.systemd1.Privileged("true")
LockAllHomes();
@org.freedesktop.systemd1.Privileged("true")
DeactivateAllHomes();
@org.freedesktop.systemd1.Privileged("true")
Rebalance();
properties:
readonly a(sso) AutoLogin = [...];
@ -373,11 +383,14 @@ node /org/freedesktop/home1 {
node /org/freedesktop/home1/home {
interface org.freedesktop.home1.Home {
methods:
@org.freedesktop.systemd1.Privileged("true")
Activate(in s secret);
@org.freedesktop.systemd1.Privileged("true")
Deactivate();
Unregister();
Realize(in s secret);
Remove();
@org.freedesktop.systemd1.Privileged("true")
Fixate(in s secret);
Authenticate(in s secret);
Update(in s user_record);
@ -385,13 +398,18 @@ node /org/freedesktop/home1/home {
in s secret);
ChangePassword(in s new_secret,
in s old_secret);
@org.freedesktop.systemd1.Privileged("true")
Lock();
@org.freedesktop.systemd1.Privileged("true")
Unlock(in s secret);
@org.freedesktop.systemd1.Privileged("true")
Acquire(in s secret,
in b please_suspend,
out h send_fd);
@org.freedesktop.systemd1.Privileged("true")
Ref(in b please_suspend,
out h send_fd);
@org.freedesktop.systemd1.Privileged("true")
Release();
properties:
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")

View File

@ -56,6 +56,7 @@ node /org/freedesktop/login1 {
ListUsers(out a(uso) users);
ListSeats(out a(so) seats);
ListInhibitors(out a(ssssuu) inhibitors);
@org.freedesktop.systemd1.Privileged("true")
CreateSession(in u uid,
in u pid,
in s service,
@ -78,6 +79,7 @@ node /org/freedesktop/login1 {
out s seat_id,
out u vtnr,
out b existing);
@org.freedesktop.systemd1.Privileged("true")
ReleaseSession(in s session_id);
ActivateSession(in s session_id);
ActivateSessionOnSeat(in s session_id,

View File

@ -46,6 +46,7 @@ node /org/freedesktop/machine1 {
out o machine);
ListMachines(out a(ssso) machines);
ListImages(out a(ssbttto) images);
@org.freedesktop.systemd1.Privileged("true")
CreateMachine(in s name,
in ay id,
in s service,
@ -54,6 +55,7 @@ node /org/freedesktop/machine1 {
in s root_directory,
in a(sv) scope_properties,
out o path);
@org.freedesktop.systemd1.Privileged("true")
CreateMachineWithNetwork(in s name,
in ay id,
in s service,
@ -63,6 +65,7 @@ node /org/freedesktop/machine1 {
in ai ifindices,
in a(sv) scope_properties,
out o path);
@org.freedesktop.systemd1.Privileged("true")
RegisterMachine(in s name,
in ay id,
in s service,
@ -70,6 +73,7 @@ node /org/freedesktop/machine1 {
in u leader,
in s root_directory,
out o path);
@org.freedesktop.systemd1.Privileged("true")
RegisterMachineWithNetwork(in s name,
in ay id,
in s service,
@ -87,6 +91,7 @@ node /org/freedesktop/machine1 {
out a(iay) addresses);
GetMachineOSRelease(in s name,
out a{ss} fields);
@org.freedesktop.systemd1.Privileged("true")
OpenMachinePTY(in s name,
out h pty,
out s pty_path);

View File

@ -153,6 +153,7 @@ node /org/freedesktop/systemd1 {
CancelJob(in u id);
ClearJobs();
ResetFailed();
@org.freedesktop.systemd1.Privileged("true")
SetShowStatus(in s mode);
ListUnits(out a(ssssssouso) units);
ListUnitsFiltered(in as states,
@ -169,11 +170,17 @@ node /org/freedesktop/systemd1 {
DumpByFileDescriptor(out h fd);
Reload();
Reexecute();
@org.freedesktop.systemd1.Privileged("true")
Exit();
@org.freedesktop.systemd1.Privileged("true")
Reboot();
@org.freedesktop.systemd1.Privileged("true")
PowerOff();
@org.freedesktop.systemd1.Privileged("true")
Halt();
@org.freedesktop.systemd1.Privileged("true")
KExec();
@org.freedesktop.systemd1.Privileged("true")
SwitchRoot(in s new_root,
in s init);
SetEnvironment(in as assignments);

View File

@ -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) + ' '