[systemd-devel] [PATCH 3/6] dbus: add a signal before locking the system

Ben Boeckel mathstuf at gmail.com
Sat Oct 27 00:08:53 PDT 2012


---
 src/login/logind-dbus.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c
index a7647e3..5417e3b 100644
--- a/src/login/logind-dbus.c
+++ b/src/login/logind-dbus.c
@@ -197,6 +197,9 @@
         "  <signal name=\"PrepareForSleep\">\n"                         \
         "   <arg name=\"active\" type=\"b\"/>\n"                        \
         "  </signal>\n"                                                 \
+        "  <signal name=\"PrepareForLock\">\n"                          \
+        "   <arg name=\"active\" type=\"b\"/>\n"                        \
+        "  </signal>\n"                                                 \
         "  <property name=\"ControlGroupHierarchy\" type=\"s\" access=\"read\"/>\n" \
         "  <property name=\"Controllers\" type=\"as\" access=\"read\"/>\n" \
         "  <property name=\"ResetControllers\" type=\"as\" access=\"read\"/>\n" \
@@ -1001,7 +1004,8 @@ static int send_start_unit(DBusConnection *connection, const char *unit_name, DB
 static int send_prepare_for(Manager *m, InhibitWhat w, bool _active) {
         static const char * const signal_name[_INHIBIT_WHAT_MAX] = {
                 [INHIBIT_SHUTDOWN] = "PrepareForShutdown",
-                [INHIBIT_SLEEP] = "PrepareForSleep"
+                [INHIBIT_SLEEP] = "PrepareForSleep",
+                [INHIBIT_LOCK] = "PrepareForLock"
         };
 
         dbus_bool_t active = _active;
-- 
1.7.12.1



More information about the systemd-devel mailing list