Lines Matching defs:state
33 static void target_set_state(Target *t, TargetState state) {
37 old_state = t->state;
38 t->state = state;
40 if (state != old_state)
44 target_state_to_string(state));
46 unit_notify(UNIT(t), state_translation_table[old_state], state_translation_table[state], true);
106 assert(t->state == TARGET_DEAD);
108 if (t->deserialized_state != t->state)
122 prefix, target_state_to_string(t->state));
129 assert(t->state == TARGET_DEAD);
139 assert(t->state == TARGET_ACTIVE);
152 unit_serialize_item(u, f, "state", target_state_to_string(s->state));
164 if (streq(key, "state")) {
165 TargetState state;
167 state = target_state_from_string(value);
168 if (state < 0)
169 log_debug("Failed to parse state value %s", value);
171 s->deserialized_state = state;
182 return state_translation_table[TARGET(u)->state];
188 return target_state_to_string(TARGET(u)->state);