X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Ftarget.c;h=fba99568a3007e53df0665c540106481167f0b98;hp=75f8ef8948db484817a53e6a30f1ad71e9645bcb;hb=2e225d657a9dd78cf647b754efa515cfd8c4db00;hpb=e99e38bbdcca3fe5956823bdb3d38544ccf93221 diff --git a/src/target.c b/src/target.c index 75f8ef894..fba99568a 100644 --- a/src/target.c +++ b/src/target.c @@ -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;