dbus-manager.c revision c2e0d600ed76f6767d59715d93cf862808552ea2
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin This file is part of systemd.
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin Copyright 2010 Lennart Poettering
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin systemd is free software; you can redistribute it and/or modify it
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin under the terms of the GNU Lesser General Public License as published by
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin the Free Software Foundation; either version 2.1 of the License, or
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin (at your option) any later version.
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin systemd is distributed in the hope that it will be useful, but
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin WITHOUT ANY WARRANTY; without even the implied warranty of
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin Lesser General Public License for more details.
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin You should have received a copy of the GNU Lesser General Public License
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin along with systemd; If not, see <http://www.gnu.org/licenses/>.
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <interface name=\"org.freedesktop.systemd1.Manager\">\n"
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <method name=\"GetUnit\">\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"name\" type=\"s\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"unit\" type=\"o\" direction=\"out\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " </method>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <method name=\"GetUnitByPID\">\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"pid\" type=\"u\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"unit\" type=\"o\" direction=\"out\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " </method>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <method name=\"LoadUnit\">\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"name\" type=\"s\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"unit\" type=\"o\" direction=\"out\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " </method>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <method name=\"StartUnit\">\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"name\" type=\"s\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"mode\" type=\"s\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"job\" type=\"o\" direction=\"out\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " </method>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <method name=\"StartUnitReplace\">\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"old_unit\" type=\"s\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"new_unit\" type=\"s\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"mode\" type=\"s\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"job\" type=\"o\" direction=\"out\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " </method>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <method name=\"StopUnit\">\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"name\" type=\"s\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"mode\" type=\"s\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"job\" type=\"o\" direction=\"out\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " </method>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <method name=\"ReloadUnit\">\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"name\" type=\"s\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"mode\" type=\"s\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"job\" type=\"o\" direction=\"out\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " </method>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <method name=\"RestartUnit\">\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"name\" type=\"s\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"mode\" type=\"s\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"job\" type=\"o\" direction=\"out\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " </method>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <method name=\"TryRestartUnit\">\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"name\" type=\"s\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"mode\" type=\"s\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"job\" type=\"o\" direction=\"out\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " </method>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <method name=\"ReloadOrRestartUnit\">\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"name\" type=\"s\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"mode\" type=\"s\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"job\" type=\"o\" direction=\"out\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " </method>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <method name=\"ReloadOrTryRestartUnit\">\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"name\" type=\"s\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"mode\" type=\"s\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"job\" type=\"o\" direction=\"out\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " </method>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <method name=\"KillUnit\">\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"name\" type=\"s\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"who\" type=\"s\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"signal\" type=\"i\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " </method>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <method name=\"ResetFailedUnit\">\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"name\" type=\"s\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " </method>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <method name=\"GetJob\">\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"id\" type=\"u\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"job\" type=\"o\" direction=\"out\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " </method>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <method name=\"CancelJob\">\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"id\" type=\"u\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " </method>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <method name=\"ClearJobs\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <method name=\"ResetFailed\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <method name=\"ListUnits\">\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"units\" type=\"a(ssssssouso)\" direction=\"out\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " </method>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <method name=\"ListJobs\">\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"jobs\" type=\"a(usssoo)\" direction=\"out\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " </method>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <method name=\"Subscribe\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <method name=\"Unsubscribe\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <method name=\"Dump\">\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"dump\" type=\"s\" direction=\"out\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " </method>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <method name=\"CreateSnapshot\">\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"name\" type=\"s\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"cleanup\" type=\"b\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"unit\" type=\"o\" direction=\"out\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " </method>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <method name=\"RemoveSnapshot\">\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"name\" type=\"s\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " </method>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <method name=\"Reload\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <method name=\"Reexecute\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <method name=\"Exit\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <method name=\"Reboot\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <method name=\"PowerOff\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <method name=\"Halt\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <method name=\"KExec\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <method name=\"SwitchRoot\">\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"new_root\" type=\"s\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"init\" type=\"s\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " </method>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <method name=\"SetEnvironment\">\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"names\" type=\"as\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " </method>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <method name=\"UnsetEnvironment\">\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"names\" type=\"as\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " </method>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <method name=\"UnsetAndSetEnvironment\">\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"unset\" type=\"as\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"set\" type=\"as\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " </method>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <method name=\"ListUnitFiles\">\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"files\" type=\"a(ss)\" direction=\"out\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " </method>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <method name=\"GetUnitFileState\">\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"file\" type=\"s\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"state\" type=\"s\" direction=\"out\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " </method>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <method name=\"EnableUnitFiles\">\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"files\" type=\"as\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"runtime\" type=\"b\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"force\" type=\"b\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"carries_install_info\" type=\"b\" direction=\"out\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"changes\" type=\"a(sss)\" direction=\"out\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " </method>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <method name=\"DisableUnitFiles\">\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"files\" type=\"as\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"runtime\" type=\"b\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"changes\" type=\"a(sss)\" direction=\"out\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " </method>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <method name=\"ReenableUnitFiles\">\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"files\" type=\"as\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"runtime\" type=\"b\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"force\" type=\"b\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"carries_install_info\" type=\"b\" direction=\"out\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"changes\" type=\"a(sss)\" direction=\"out\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " </method>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <method name=\"LinkUnitFiles\">\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"files\" type=\"as\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"runtime\" type=\"b\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"force\" type=\"b\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"changes\" type=\"a(sss)\" direction=\"out\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " </method>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <method name=\"PresetUnitFiles\">\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"files\" type=\"as\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"runtime\" type=\"b\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"force\" type=\"b\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"carries_install_info\" type=\"b\" direction=\"out\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"changes\" type=\"a(sss)\" direction=\"out\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " </method>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <method name=\"MaskUnitFiles\">\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"files\" type=\"as\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"runtime\" type=\"b\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"force\" type=\"b\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"changes\" type=\"a(sss)\" direction=\"out\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " </method>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <method name=\"UnmaskUnitFiles\">\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"files\" type=\"as\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"runtime\" type=\"b\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"changes\" type=\"a(sss)\" direction=\"out\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " </method>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <method name=\"SetDefaultTarget\">\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"files\" type=\"as\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"changes\" type=\"a(sss)\" direction=\"out\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " </method>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <method name=\"GetDefaultTarget\">\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"name\" type=\"s\" direction=\"out\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " </method>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <method name=\"SetUnitProperties\">\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"name\" type=\"s\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"runtime\" type=\"b\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"properties\" type=\"a(sv)\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " </method>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <method name=\"StartTransientUnit\">\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"name\" type=\"s\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"mode\" type=\"s\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"properties\" type=\"a(sv)\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"aux\" type=\"a(sa(sv))\" direction=\"in\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"job\" type=\"o\" direction=\"out\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " </method>\n"
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <signal name=\"UnitNew\">\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"id\" type=\"s\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"unit\" type=\"o\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " </signal>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <signal name=\"UnitRemoved\">\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"id\" type=\"s\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"unit\" type=\"o\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " </signal>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <signal name=\"JobNew\">\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"id\" type=\"u\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"job\" type=\"o\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"unit\" type=\"s\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " </signal>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <signal name=\"JobRemoved\">\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"id\" type=\"u\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"job\" type=\"o\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"unit\" type=\"s\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"result\" type=\"s\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " </signal>" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <signal name=\"StartupFinished\">\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"firmware\" type=\"t\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"loader\" type=\"t\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"kernel\" type=\"t\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"initrd\" type=\"t\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"userspace\" type=\"t\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"total\" type=\"t\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " </signal>" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <signal name=\"UnitFilesChanged\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <signal name=\"Reloading\">\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <arg name=\"active\" type=\"b\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin#define BUS_MANAGER_INTERFACE_PROPERTIES_GENERAL \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <property name=\"Version\" type=\"s\" access=\"read\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <property name=\"Features\" type=\"s\" access=\"read\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <property name=\"Tainted\" type=\"s\" access=\"read\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <property name=\"FirmwareTimestamp\" type=\"t\" access=\"read\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <property name=\"FirmwareTimestampMonotonic\" type=\"t\" access=\"read\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <property name=\"LoaderTimestamp\" type=\"t\" access=\"read\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <property name=\"LoaderTimestampMonotonic\" type=\"t\" access=\"read\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <property name=\"KernelTimestamp\" type=\"t\" access=\"read\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <property name=\"KernelTimestampMonotonic\" type=\"t\" access=\"read\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <property name=\"InitRDTimestamp\" type=\"t\" access=\"read\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <property name=\"InitRDTimestampMonotonic\" type=\"t\" access=\"read\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <property name=\"UserspaceTimestamp\" type=\"t\" access=\"read\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <property name=\"UserspaceTimestampMonotonic\" type=\"t\" access=\"read\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <property name=\"FinishTimestamp\" type=\"t\" access=\"read\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <property name=\"FinishTimestampMonotonic\" type=\"t\" access=\"read\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <property name=\"SecurityStartTimestamp\" type=\"t\" access=\"read\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <property name=\"SecurityStartTimestampMonotonic\" type=\"t\" access=\"read\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <property name=\"SecurityFinishTimestamp\" type=\"t\" access=\"read\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <property name=\"SecurityFinishTimestampMonotonic\" type=\"t\" access=\"read\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <property name=\"GeneratorsStartTimestamp\" type=\"t\" access=\"read\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <property name=\"GeneratorsStartTimestampMonotonic\" type=\"t\" access=\"read\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <property name=\"GeneratorsFinishTimestamp\" type=\"t\" access=\"read\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <property name=\"GeneratorsFinishTimestampMonotonic\" type=\"t\" access=\"read\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <property name=\"UnitsLoadStartTimestamp\" type=\"t\" access=\"read\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <property name=\"UnitsLoadStartTimestampMonotonic\" type=\"t\" access=\"read\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <property name=\"UnitsLoadFinishTimestamp\" type=\"t\" access=\"read\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <property name=\"UnitsLoadFinishTimestampMonotonic\" type=\"t\" access=\"read\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <property name=\"LogLevel\" type=\"s\" access=\"readwrite\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <property name=\"LogTarget\" type=\"s\" access=\"readwrite\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <property name=\"NNames\" type=\"u\" access=\"read\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <property name=\"NJobs\" type=\"u\" access=\"read\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <property name=\"NInstalledJobs\" type=\"u\" access=\"read\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <property name=\"NFailedJobs\" type=\"u\" access=\"read\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <property name=\"Progress\" type=\"d\" access=\"read\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <property name=\"Environment\" type=\"as\" access=\"read\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <property name=\"ConfirmSpawn\" type=\"b\" access=\"read\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <property name=\"ShowStatus\" type=\"b\" access=\"read\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <property name=\"UnitPath\" type=\"as\" access=\"read\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <property name=\"DefaultStandardOutput\" type=\"s\" access=\"read\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <property name=\"DefaultStandardError\" type=\"s\" access=\"read\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <property name=\"RuntimeWatchdogUSec\" type=\"t\" access=\"readwrite\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <property name=\"ShutdownWatchdogUSec\" type=\"t\" access=\"readwrite\"/>\n" \
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " <property name=\"Virtualization\" type=\"s\" access=\"read\"/>\n"
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin " </interface>\n"
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin "org.freedesktop.systemd1.Manager\0"
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchininconst char bus_manager_interface[] = BUS_MANAGER_INTERFACE;
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchininstatic DEFINE_BUS_PROPERTY_APPEND_ENUM(bus_manager_append_exec_output, exec_output, ExecOutput);
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchininstatic int bus_manager_append_tainted(DBusMessageIter *i, const char *property, void *data) {
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin const char *t;
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin /* remove the last ':' */
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin if (!dbus_message_iter_append_basic(i, DBUS_TYPE_STRING, &t))
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchininstatic int bus_manager_append_log_target(DBusMessageIter *i, const char *property, void *data) {
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin const char *t;
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin if (!dbus_message_iter_append_basic(i, DBUS_TYPE_STRING, &t))
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchininstatic int bus_manager_set_log_target(DBusMessageIter *i, const char *property, void *data) {
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin const char *t;
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchininstatic int bus_manager_append_log_level(DBusMessageIter *i, const char *property, void *data) {
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin r = log_level_to_string_alloc(log_get_max_level(), &t);
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin if (!dbus_message_iter_append_basic(i, DBUS_TYPE_STRING, &t))
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchininstatic int bus_manager_set_log_level(DBusMessageIter *i, const char *property, void *data) {
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin const char *t;
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchininstatic int bus_manager_append_n_names(DBusMessageIter *i, const char *property, void *data) {
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin if (!dbus_message_iter_append_basic(i, DBUS_TYPE_UINT32, &u))
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchininstatic int bus_manager_append_n_jobs(DBusMessageIter *i, const char *property, void *data) {
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin if (!dbus_message_iter_append_basic(i, DBUS_TYPE_UINT32, &u))
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchininstatic int bus_manager_append_progress(DBusMessageIter *i, const char *property, void *data) {
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin if (dual_timestamp_is_set(&m->finish_timestamp))
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin d = 1.0 - ((double) hashmap_size(m->jobs) / (double) m->n_installed_jobs);
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin if (!dbus_message_iter_append_basic(i, DBUS_TYPE_DOUBLE, &d))
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchininstatic int bus_manager_append_virt(DBusMessageIter *i, const char *property, void *data) {
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin if (!dbus_message_iter_append_basic(i, DBUS_TYPE_STRING, &id))
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin if (!dbus_message_iter_append_basic(&iter, DBUS_TYPE_BOOLEAN, &b))
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin if (!dbus_message_iter_open_container(&iter, DBUS_TYPE_ARRAY, "(sss)", &sub))
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin for (i = 0; i < n_changes; i++) {
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin type = unit_file_change_type_to_string(changes[i].type);
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin if (!dbus_message_iter_open_container(&sub, DBUS_TYPE_STRUCT, NULL, &sub2) ||
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin !dbus_message_iter_append_basic(&sub2, DBUS_TYPE_STRING, &type) ||
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin !dbus_message_iter_append_basic(&sub2, DBUS_TYPE_STRING, &path) ||
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin !dbus_message_iter_append_basic(&sub2, DBUS_TYPE_STRING, &source) ||
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin !dbus_message_iter_close_container(&sub, &sub2))
bbaa8b60dd95d714741fc474adad3cf710ef4efdDan Kruchinin if (!dbus_message_iter_close_container(&iter, &sub))
return reply;
oom:
return NULL;
DBusMessage *s;
s = dbus_message_new_signal("/org/freedesktop/systemd1", "org.freedesktop.systemd1.Manager", "UnitFilesChanged");
return -ENOMEM;
r = bus_broadcast(m, s);
static int bus_manager_set_runtime_watchdog_usec(DBusMessageIter *i, const char *property, void *data) {
assert(i);
dbus_message_iter_get_basic(i, t);
return watchdog_set_timeout(t);
static const char systemd_property_string[] =
{ NULL, }
{ "FirmwareTimestamp", bus_property_append_uint64, "t", offsetof(Manager, firmware_timestamp.realtime) },
{ "FirmwareTimestampMonotonic", bus_property_append_uint64, "t", offsetof(Manager, firmware_timestamp.monotonic) },
{ "LoaderTimestamp", bus_property_append_uint64, "t", offsetof(Manager, loader_timestamp.realtime) },
{ "LoaderTimestampMonotonic", bus_property_append_uint64, "t", offsetof(Manager, loader_timestamp.monotonic) },
{ "KernelTimestamp", bus_property_append_uint64, "t", offsetof(Manager, kernel_timestamp.realtime) },
{ "KernelTimestampMonotonic", bus_property_append_uint64, "t", offsetof(Manager, kernel_timestamp.monotonic) },
{ "InitRDTimestamp", bus_property_append_uint64, "t", offsetof(Manager, initrd_timestamp.realtime) },
{ "InitRDTimestampMonotonic", bus_property_append_uint64, "t", offsetof(Manager, initrd_timestamp.monotonic) },
{ "UserspaceTimestamp", bus_property_append_uint64, "t", offsetof(Manager, userspace_timestamp.realtime) },
{ "UserspaceTimestampMonotonic", bus_property_append_uint64, "t", offsetof(Manager, userspace_timestamp.monotonic) },
{ "FinishTimestamp", bus_property_append_uint64, "t", offsetof(Manager, finish_timestamp.realtime) },
{ "FinishTimestampMonotonic", bus_property_append_uint64, "t", offsetof(Manager, finish_timestamp.monotonic) },
{ "SecurityStartTimestamp", bus_property_append_uint64, "t", offsetof(Manager, security_start_timestamp.realtime) },
{ "SecurityStartTimestampMonotonic", bus_property_append_uint64, "t", offsetof(Manager, security_start_timestamp.monotonic) },
{ "SecurityFinishTimestamp", bus_property_append_uint64, "t", offsetof(Manager, security_finish_timestamp.realtime) },
{ "SecurityFinishTimestampMonotonic", bus_property_append_uint64, "t", offsetof(Manager, security_finish_timestamp.monotonic) },
{ "GeneratorsStartTimestamp", bus_property_append_uint64, "t", offsetof(Manager, generators_start_timestamp.realtime) },
{ "GeneratorsStartTimestampMonotonic", bus_property_append_uint64, "t", offsetof(Manager, generators_start_timestamp.monotonic) },
{ "GeneratorsFinishTimestamp", bus_property_append_uint64, "t", offsetof(Manager, generators_finish_timestamp.realtime) },
{ "GeneratorsFinishTimestampMonotonic", bus_property_append_uint64, "t", offsetof(Manager, generators_finish_timestamp.monotonic) },
{ "UnitsLoadStartTimestamp", bus_property_append_uint64, "t", offsetof(Manager, unitsload_start_timestamp.realtime) },
{ "UnitsLoadStartTimestampMonotonic", bus_property_append_uint64, "t", offsetof(Manager, unitsload_start_timestamp.monotonic) },
{ "UnitsLoadFinishTimestamp", bus_property_append_uint64, "t", offsetof(Manager, unitsload_finish_timestamp.realtime) },
{ "UnitsLoadFinishTimestampMonotonic", bus_property_append_uint64, "t", offsetof(Manager, unitsload_finish_timestamp.monotonic) },
{ "DefaultStandardOutput", bus_manager_append_exec_output, "s", offsetof(Manager, default_std_output) },
{ "DefaultStandardError", bus_manager_append_exec_output, "s", offsetof(Manager, default_std_error) },
{ "RuntimeWatchdogUSec", bus_property_append_usec, "t", offsetof(Manager, runtime_watchdog), false, bus_manager_set_runtime_watchdog_usec },
{ "ShutdownWatchdogUSec", bus_property_append_usec, "t", offsetof(Manager, shutdown_watchdog), false, bus_property_set_usec },
{ NULL, }
static DBusHandlerResult bus_manager_message_handler(DBusConnection *connection, DBusMessage *message, void *data) {
bool reload_if_possible = false;
const char *member;
assert(m);
const char *name;
Unit *u;
if (!dbus_message_get_args(
&error,
if (!reply)
goto oom;
if (!path)
goto oom;
if (!dbus_message_append_args(
goto oom;
} else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "GetUnitByPID")) {
Unit *u;
if (!dbus_message_get_args(
&error,
dbus_set_error(&error, BUS_ERROR_NO_SUCH_UNIT, "No unit for PID %lu is loaded.", (unsigned long) pid);
if (!reply)
goto oom;
if (!path)
goto oom;
if (!dbus_message_append_args(
goto oom;
const char *name;
Unit *u;
if (!dbus_message_get_args(
&error,
if (!reply)
goto oom;
if (!path)
goto oom;
if (!dbus_message_append_args(
goto oom;
else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "StartUnitReplace"))
else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "TryRestartUnit"))
else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "ReloadOrRestartUnit")) {
reload_if_possible = true;
} else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "ReloadOrTryRestartUnit")) {
reload_if_possible = true;
Unit *u;
if (!dbus_message_get_args(
&error,
if (who < 0)
if (!reply)
goto oom;
Job *j;
if (!dbus_message_get_args(
&error,
if (!reply)
goto oom;
if (!path)
goto oom;
if (!dbus_message_append_args(
goto oom;
Job *j;
if (!dbus_message_get_args(
&error,
if (!reply)
goto oom;
if (!reply)
goto oom;
} else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "ResetFailed")) {
if (!reply)
goto oom;
} else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "ResetFailedUnit")) {
const char *name;
Unit *u;
if (!dbus_message_get_args(
&error,
if (!reply)
goto oom;
Iterator i;
Unit *u;
if (!reply)
goto oom;
goto oom;
Unit *f;
if (k != u->id)
goto oom;
f = unit_following(u);
if (!u_path)
goto oom;
if (u->job) {
goto oom;
job_id = 0;
if (u->job)
goto oom;
if (u->job)
goto oom;
goto oom;
Iterator i;
Job *j;
if (!reply)
goto oom;
goto oom;
goto oom;
if (!j_path)
goto oom;
if (!u_path) {
goto oom;
goto oom;
goto oom;
goto oom;
char *client;
Set *s;
goto oom;
if (!client)
goto oom;
if (!reply)
goto oom;
} else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "Unsubscribe")) {
char *client;
client = set_remove(BUS_CONNECTION_SUBSCRIBED(m, connection), (char*) bus_message_get_sender_with_fallback(message));
if (!client) {
if (!reply)
goto oom;
FILE *f;
if (!reply)
goto oom;
goto oom;
if (ferror(f)) {
fclose(f);
goto oom;
fclose(f);
goto oom;
} else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "CreateSnapshot")) {
const char *name;
Snapshot *s;
if (!dbus_message_get_args(
&error,
if (!reply)
goto oom;
if (!path)
goto oom;
if (!dbus_message_append_args(
goto oom;
} else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "RemoveSnapshot")) {
const char *name;
Unit *u;
if (!dbus_message_get_args(
&error,
if (!reply)
goto oom;
} else if (dbus_message_is_method_call(message, "org.freedesktop.DBus.Introspectable", "Introspect")) {
FILE *f;
Iterator i;
Unit *u;
Job *j;
if (!reply)
goto oom;
goto oom;
if (k != u->id)
p = bus_path_escape(k);
fclose(f);
goto oom;
if (ferror(f)) {
fclose(f);
goto oom;
fclose(f);
if (!introspection)
goto oom;
goto oom;
if (!m->queued_message)
goto oom;
dbus_set_error(&error, BUS_ERROR_NOT_SUPPORTED, "Exit is only supported for user service managers.");
if (!reply)
goto oom;
if (!reply)
goto oom;
dbus_set_error(&error, BUS_ERROR_NOT_SUPPORTED, "Powering off is only supported for system managers.");
if (!reply)
goto oom;
if (!reply)
goto oom;
if (!reply)
goto oom;
} else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "SwitchRoot")) {
bool good;
if (!dbus_message_get_args(
&error,
dbus_set_error(&error, BUS_ERROR_NOT_SUPPORTED, "Switching root is only supported for system managers.");
if (!good)
log_error("Not switching root: %s does not seem to be an OS tree. /etc/os-release is missing.", switch_root);
goto oom;
if (!good)
if (!good)
goto oom;
free(u);
goto oom;
v = NULL;
m->switch_root = u;
m->switch_root_init = v;
if (!reply)
goto oom;
} else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "SetEnvironment")) {
char **e = NULL;
if (r == -ENOMEM)
goto oom;
if (!strv_env_is_valid(l))
goto oom;
if (!reply) {
strv_free(e);
goto oom;
m->environment = e;
} else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "UnsetEnvironment")) {
char **e = NULL;
if (r == -ENOMEM)
goto oom;
if (!strv_env_name_or_assignment_is_valid(l))
goto oom;
if (!reply) {
strv_free(e);
goto oom;
m->environment = e;
} else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "UnsetAndSetEnvironment")) {
char **f = NULL;
goto oom;
if (r == -ENOMEM)
goto oom;
if (r == -ENOMEM)
goto oom;
goto oom;
goto oom;
if (!reply) {
strv_free(f);
goto oom;
m->environment = f;
} else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "ListUnitFiles")) {
Hashmap *h;
Iterator i;
if (!reply)
goto oom;
goto oom;
r = unit_file_get_list(m->running_as == SYSTEMD_SYSTEM ? UNIT_FILE_SYSTEM : UNIT_FILE_USER, NULL, h);
goto oom;
const char *state;
goto oom;
goto oom;
} else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "GetUnitFileState")) {
const char *name;
if (!dbus_message_get_args(
&error,
state = unit_file_get_state(m->running_as == SYSTEMD_SYSTEM ? UNIT_FILE_SYSTEM : UNIT_FILE_USER, NULL, name);
if (state < 0)
assert(s);
if (!reply)
goto oom;
if (!dbus_message_append_args(
DBUS_TYPE_STRING, &s,
goto oom;
} else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "EnableUnitFiles") ||
char **l = NULL;
unsigned n_changes = 0;
goto oom;
if (r == -ENOMEM)
goto oom;
strv_free(l);
carries_install_info = r;
carries_install_info = r;
carries_install_info = r;
strv_free(l);
if (!reply)
goto oom;
} else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "DisableUnitFiles") ||
char **l = NULL;
unsigned n_changes = 0;
goto oom;
if (r == -ENOMEM)
goto oom;
strv_free(l);
strv_free(l);
if (!reply)
goto oom;
} else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "GetDefaultTarget")) {
if (!reply)
goto oom;
goto oom;
} else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "SetUnitProperties")) {
const char *name;
Unit *u;
goto oom;
if (!reply)
goto oom;
} else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "StartTransientUnit")) {
UnitType t;
Unit *u;
goto oom;
dbus_set_error(&error, DBUS_ERROR_INVALID_ARGS, "Unit type %s does not support transient units.", unit_type_to_string(t));
if (mode < 0) {
r = unit_make_transient(u);
r = unit_load(u);
{ NULL, }
Unit *u;
dbus_bool_t b;
&error,
&error,
if (old_name) {
if (mode < 0) {
if (reply)
goto oom;
return DBUS_HANDLER_RESULT_HANDLED;
oom:
return DBUS_HANDLER_RESULT_NEED_MEMORY;