chiark / gitweb /
pam: make sure we don't assign colliding session ids if we get our session ids from...
[elogind.git] / src / target.c
index 75f8ef8948db484817a53e6a30f1ad71e9645bcb..fba99568a3007e53df0665c540106481167f0b98 100644 (file)
@@ -27,6 +27,7 @@
 #include "load-fragment.h"
 #include "log.h"
 #include "dbus-target.h"
+#include "special.h"
 
 static const UnitActiveState state_translation_table[_TARGET_STATE_MAX] = {
         [TARGET_DEAD] = UNIT_INACTIVE,
@@ -42,7 +43,7 @@ static void target_set_state(Target *t, TargetState state) {
 
         if (state != old_state)
                 log_debug("%s changed %s -> %s",
-                          UNIT(t)->meta.id,
+                          t->meta.id,
                           target_state_to_string(old_state),
                           target_state_to_string(state));
 
@@ -147,9 +148,9 @@ int target_get_runlevel(Target *t) {
                 { SPECIAL_RUNLEVEL4_TARGET, '4' },
                 { SPECIAL_RUNLEVEL3_TARGET, '3' },
                 { SPECIAL_RUNLEVEL2_TARGET, '2' },
-                { SPECIAL_RUNLEVEL1_TARGET, '1' },
-                { SPECIAL_RUNLEVEL0_TARGET, '0' },
-                { SPECIAL_RUNLEVEL6_TARGET, '6' },
+                { SPECIAL_RESCUE_TARGET,    '1' },
+                { SPECIAL_POWEROFF_TARGET,  '0' },
+                { SPECIAL_REBOOT_TARGET,    '6' },
         };
 
         unsigned i;