slice.c revision 598459cebac7cc93089769a992e7b03287f77e12
03831d35f7499c87d51205817c93e9a8d42c4baestevel/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel/***
03831d35f7499c87d51205817c93e9a8d42c4baestevel This file is part of systemd.
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel Copyright 2013 Lennart Poettering
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel systemd is free software; you can redistribute it and/or modify it
03831d35f7499c87d51205817c93e9a8d42c4baestevel under the terms of the GNU Lesser General Public License as published by
03831d35f7499c87d51205817c93e9a8d42c4baestevel the Free Software Foundation; either version 2.1 of the License, or
03831d35f7499c87d51205817c93e9a8d42c4baestevel (at your option) any later version.
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel systemd is distributed in the hope that it will be useful, but
03831d35f7499c87d51205817c93e9a8d42c4baestevel WITHOUT ANY WARRANTY; without even the implied warranty of
03831d35f7499c87d51205817c93e9a8d42c4baestevel MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
03831d35f7499c87d51205817c93e9a8d42c4baestevel Lesser General Public License for more details.
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel You should have received a copy of the GNU Lesser General Public License
03831d35f7499c87d51205817c93e9a8d42c4baestevel along with systemd; If not, see <http://www.gnu.org/licenses/>.
03831d35f7499c87d51205817c93e9a8d42c4baestevel***/
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel#include <errno.h>
03831d35f7499c87d51205817c93e9a8d42c4baestevel#include <signal.h>
03831d35f7499c87d51205817c93e9a8d42c4baestevel#include <unistd.h>
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel#include "unit.h"
03831d35f7499c87d51205817c93e9a8d42c4baestevel#include "slice.h"
03831d35f7499c87d51205817c93e9a8d42c4baestevel#include "load-fragment.h"
03831d35f7499c87d51205817c93e9a8d42c4baestevel#include "log.h"
03831d35f7499c87d51205817c93e9a8d42c4baestevel#include "dbus-slice.h"
03831d35f7499c87d51205817c93e9a8d42c4baestevel#include "special.h"
03831d35f7499c87d51205817c93e9a8d42c4baestevel#include "unit-name.h"
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevelstatic const UnitActiveState state_translation_table[_SLICE_STATE_MAX] = {
03831d35f7499c87d51205817c93e9a8d42c4baestevel [SLICE_DEAD] = UNIT_INACTIVE,
03831d35f7499c87d51205817c93e9a8d42c4baestevel [SLICE_ACTIVE] = UNIT_ACTIVE
03831d35f7499c87d51205817c93e9a8d42c4baestevel};
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevelstatic void slice_set_state(Slice *t, SliceState state) {
03831d35f7499c87d51205817c93e9a8d42c4baestevel SliceState old_state;
03831d35f7499c87d51205817c93e9a8d42c4baestevel assert(t);
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel old_state = t->state;
03831d35f7499c87d51205817c93e9a8d42c4baestevel t->state = state;
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel if (state != old_state)
03831d35f7499c87d51205817c93e9a8d42c4baestevel log_debug("%s changed %s -> %s",
03831d35f7499c87d51205817c93e9a8d42c4baestevel UNIT(t)->id,
03831d35f7499c87d51205817c93e9a8d42c4baestevel slice_state_to_string(old_state),
03831d35f7499c87d51205817c93e9a8d42c4baestevel slice_state_to_string(state));
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel unit_notify(UNIT(t), state_translation_table[old_state], state_translation_table[state], true);
03831d35f7499c87d51205817c93e9a8d42c4baestevel}
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevelstatic int slice_add_parent_slice(Slice *s) {
03831d35f7499c87d51205817c93e9a8d42c4baestevel char *a, *dash;
03831d35f7499c87d51205817c93e9a8d42c4baestevel Unit *parent;
03831d35f7499c87d51205817c93e9a8d42c4baestevel int r;
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel assert(s);
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel if (UNIT_ISSET(UNIT(s)->slice))
03831d35f7499c87d51205817c93e9a8d42c4baestevel return 0;
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel if (unit_has_name(UNIT(s), SPECIAL_ROOT_SLICE))
03831d35f7499c87d51205817c93e9a8d42c4baestevel return 0;
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel a = strdupa(UNIT(s)->id);
03831d35f7499c87d51205817c93e9a8d42c4baestevel dash = strrchr(a, '-');
03831d35f7499c87d51205817c93e9a8d42c4baestevel if (dash)
03831d35f7499c87d51205817c93e9a8d42c4baestevel strcpy(dash, ".slice");
03831d35f7499c87d51205817c93e9a8d42c4baestevel else
03831d35f7499c87d51205817c93e9a8d42c4baestevel a = (char*) SPECIAL_ROOT_SLICE;
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel r = manager_load_unit(UNIT(s)->manager, a, NULL, NULL, &parent);
03831d35f7499c87d51205817c93e9a8d42c4baestevel if (r < 0)
03831d35f7499c87d51205817c93e9a8d42c4baestevel return r;
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel unit_ref_set(&UNIT(s)->slice, parent);
03831d35f7499c87d51205817c93e9a8d42c4baestevel return 0;
03831d35f7499c87d51205817c93e9a8d42c4baestevel}
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevelstatic int slice_add_default_dependencies(Slice *s) {
03831d35f7499c87d51205817c93e9a8d42c4baestevel int r;
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel assert(s);
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel /* Make sure slices are unloaded on shutdown */
03831d35f7499c87d51205817c93e9a8d42c4baestevel r = unit_add_two_dependencies_by_name(
03831d35f7499c87d51205817c93e9a8d42c4baestevel UNIT(s),
03831d35f7499c87d51205817c93e9a8d42c4baestevel UNIT_BEFORE, UNIT_CONFLICTS,
03831d35f7499c87d51205817c93e9a8d42c4baestevel SPECIAL_SHUTDOWN_TARGET, NULL, true);
03831d35f7499c87d51205817c93e9a8d42c4baestevel if (r < 0)
03831d35f7499c87d51205817c93e9a8d42c4baestevel return r;
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel return 0;
03831d35f7499c87d51205817c93e9a8d42c4baestevel}
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevelstatic int slice_verify(Slice *s) {
03831d35f7499c87d51205817c93e9a8d42c4baestevel assert(s);
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel if (UNIT(s)->load_state != UNIT_LOADED)
03831d35f7499c87d51205817c93e9a8d42c4baestevel return 0;
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel if (UNIT_DEREF(UNIT(s)->slice)) {
03831d35f7499c87d51205817c93e9a8d42c4baestevel char *a, *dash;
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel a = strdupa(UNIT(s)->id);
03831d35f7499c87d51205817c93e9a8d42c4baestevel dash = strrchr(a, '-');
03831d35f7499c87d51205817c93e9a8d42c4baestevel if (dash)
03831d35f7499c87d51205817c93e9a8d42c4baestevel strcpy(dash, ".slice");
03831d35f7499c87d51205817c93e9a8d42c4baestevel else
03831d35f7499c87d51205817c93e9a8d42c4baestevel a = (char*) SPECIAL_ROOT_SLICE;
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel if (!unit_has_name(UNIT_DEREF(UNIT(s)->slice), a)) {
03831d35f7499c87d51205817c93e9a8d42c4baestevel log_error_unit(UNIT(s)->id,
03831d35f7499c87d51205817c93e9a8d42c4baestevel "%s located outside its parent slice. Refusing.", UNIT(s)->id);
03831d35f7499c87d51205817c93e9a8d42c4baestevel return -EINVAL;
03831d35f7499c87d51205817c93e9a8d42c4baestevel }
03831d35f7499c87d51205817c93e9a8d42c4baestevel }
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel return 0;
03831d35f7499c87d51205817c93e9a8d42c4baestevel}
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevelstatic int slice_load(Unit *u) {
03831d35f7499c87d51205817c93e9a8d42c4baestevel Slice *s = SLICE(u);
03831d35f7499c87d51205817c93e9a8d42c4baestevel int r;
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel assert(s);
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel r = unit_load_fragment_and_dropin_optional(u);
03831d35f7499c87d51205817c93e9a8d42c4baestevel if (r < 0)
03831d35f7499c87d51205817c93e9a8d42c4baestevel return r;
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel /* This is a new unit? Then let's add in some extras */
03831d35f7499c87d51205817c93e9a8d42c4baestevel if (u->load_state == UNIT_LOADED) {
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel r = unit_patch_contexts(u);
03831d35f7499c87d51205817c93e9a8d42c4baestevel if (r < 0)
03831d35f7499c87d51205817c93e9a8d42c4baestevel return r;
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel r = slice_add_parent_slice(s);
03831d35f7499c87d51205817c93e9a8d42c4baestevel if (r < 0)
03831d35f7499c87d51205817c93e9a8d42c4baestevel return r;
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel if (u->default_dependencies) {
03831d35f7499c87d51205817c93e9a8d42c4baestevel r = slice_add_default_dependencies(s);
03831d35f7499c87d51205817c93e9a8d42c4baestevel if (r < 0)
03831d35f7499c87d51205817c93e9a8d42c4baestevel return r;
03831d35f7499c87d51205817c93e9a8d42c4baestevel }
03831d35f7499c87d51205817c93e9a8d42c4baestevel }
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel return slice_verify(s);
03831d35f7499c87d51205817c93e9a8d42c4baestevel}
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevelstatic int slice_coldplug(Unit *u) {
03831d35f7499c87d51205817c93e9a8d42c4baestevel Slice *t = SLICE(u);
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel assert(t);
03831d35f7499c87d51205817c93e9a8d42c4baestevel assert(t->state == SLICE_DEAD);
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel if (t->deserialized_state != t->state)
03831d35f7499c87d51205817c93e9a8d42c4baestevel slice_set_state(t, t->deserialized_state);
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel return 0;
03831d35f7499c87d51205817c93e9a8d42c4baestevel}
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevelstatic void slice_dump(Unit *u, FILE *f, const char *prefix) {
03831d35f7499c87d51205817c93e9a8d42c4baestevel Slice *t = SLICE(u);
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel assert(t);
03831d35f7499c87d51205817c93e9a8d42c4baestevel assert(f);
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel fprintf(f,
03831d35f7499c87d51205817c93e9a8d42c4baestevel "%sSlice State: %s\n",
03831d35f7499c87d51205817c93e9a8d42c4baestevel prefix, slice_state_to_string(t->state));
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel cgroup_context_dump(&t->cgroup_context, f, prefix);
03831d35f7499c87d51205817c93e9a8d42c4baestevel}
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevelstatic int slice_start(Unit *u) {
03831d35f7499c87d51205817c93e9a8d42c4baestevel Slice *t = SLICE(u);
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel assert(t);
03831d35f7499c87d51205817c93e9a8d42c4baestevel assert(t->state == SLICE_DEAD);
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel unit_realize_cgroup(u);
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel slice_set_state(t, SLICE_ACTIVE);
03831d35f7499c87d51205817c93e9a8d42c4baestevel return 0;
03831d35f7499c87d51205817c93e9a8d42c4baestevel}
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevelstatic int slice_stop(Unit *u) {
03831d35f7499c87d51205817c93e9a8d42c4baestevel Slice *t = SLICE(u);
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel assert(t);
03831d35f7499c87d51205817c93e9a8d42c4baestevel assert(t->state == SLICE_ACTIVE);
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel /* We do not need to destroy the cgroup explicitly,
03831d35f7499c87d51205817c93e9a8d42c4baestevel * unit_notify() will do that for us anyway. */
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel slice_set_state(t, SLICE_DEAD);
03831d35f7499c87d51205817c93e9a8d42c4baestevel return 0;
03831d35f7499c87d51205817c93e9a8d42c4baestevel}
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevelstatic int slice_kill(Unit *u, KillWho who, int signo, sd_bus_error *error) {
03831d35f7499c87d51205817c93e9a8d42c4baestevel return unit_kill_common(u, who, signo, -1, -1, error);
03831d35f7499c87d51205817c93e9a8d42c4baestevel}
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevelstatic int slice_serialize(Unit *u, FILE *f, FDSet *fds) {
03831d35f7499c87d51205817c93e9a8d42c4baestevel Slice *s = SLICE(u);
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel assert(s);
03831d35f7499c87d51205817c93e9a8d42c4baestevel assert(f);
03831d35f7499c87d51205817c93e9a8d42c4baestevel assert(fds);
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel unit_serialize_item(u, f, "state", slice_state_to_string(s->state));
03831d35f7499c87d51205817c93e9a8d42c4baestevel return 0;
03831d35f7499c87d51205817c93e9a8d42c4baestevel}
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevelstatic int slice_deserialize_item(Unit *u, const char *key, const char *value, FDSet *fds) {
03831d35f7499c87d51205817c93e9a8d42c4baestevel Slice *s = SLICE(u);
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel assert(u);
03831d35f7499c87d51205817c93e9a8d42c4baestevel assert(key);
03831d35f7499c87d51205817c93e9a8d42c4baestevel assert(value);
03831d35f7499c87d51205817c93e9a8d42c4baestevel assert(fds);
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel if (streq(key, "state")) {
03831d35f7499c87d51205817c93e9a8d42c4baestevel SliceState state;
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel state = slice_state_from_string(value);
03831d35f7499c87d51205817c93e9a8d42c4baestevel if (state < 0)
03831d35f7499c87d51205817c93e9a8d42c4baestevel log_debug("Failed to parse state value %s", value);
03831d35f7499c87d51205817c93e9a8d42c4baestevel else
03831d35f7499c87d51205817c93e9a8d42c4baestevel s->deserialized_state = state;
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel } else
03831d35f7499c87d51205817c93e9a8d42c4baestevel log_debug("Unknown serialization key '%s'", key);
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel return 0;
03831d35f7499c87d51205817c93e9a8d42c4baestevel}
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel_pure_ static UnitActiveState slice_active_state(Unit *u) {
03831d35f7499c87d51205817c93e9a8d42c4baestevel assert(u);
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel return state_translation_table[SLICE(u)->state];
03831d35f7499c87d51205817c93e9a8d42c4baestevel}
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel_pure_ static const char *slice_sub_state_to_string(Unit *u) {
03831d35f7499c87d51205817c93e9a8d42c4baestevel assert(u);
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel return slice_state_to_string(SLICE(u)->state);
03831d35f7499c87d51205817c93e9a8d42c4baestevel}
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevelstatic const char* const slice_state_table[_SLICE_STATE_MAX] = {
03831d35f7499c87d51205817c93e9a8d42c4baestevel [SLICE_DEAD] = "dead",
03831d35f7499c87d51205817c93e9a8d42c4baestevel [SLICE_ACTIVE] = "active"
03831d35f7499c87d51205817c93e9a8d42c4baestevel};
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevelDEFINE_STRING_TABLE_LOOKUP(slice_state, SliceState);
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevelconst UnitVTable slice_vtable = {
03831d35f7499c87d51205817c93e9a8d42c4baestevel .object_size = sizeof(Slice),
03831d35f7499c87d51205817c93e9a8d42c4baestevel .cgroup_context_offset = offsetof(Slice, cgroup_context),
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel .sections =
03831d35f7499c87d51205817c93e9a8d42c4baestevel "Unit\0"
03831d35f7499c87d51205817c93e9a8d42c4baestevel "Slice\0"
03831d35f7499c87d51205817c93e9a8d42c4baestevel "Install\0",
03831d35f7499c87d51205817c93e9a8d42c4baestevel .private_section = "Slice",
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel .no_alias = true,
03831d35f7499c87d51205817c93e9a8d42c4baestevel .no_instances = true,
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel .load = slice_load,
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel .coldplug = slice_coldplug,
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel .dump = slice_dump,
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel .start = slice_start,
03831d35f7499c87d51205817c93e9a8d42c4baestevel .stop = slice_stop,
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel .kill = slice_kill,
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel .serialize = slice_serialize,
03831d35f7499c87d51205817c93e9a8d42c4baestevel .deserialize_item = slice_deserialize_item,
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel .active_state = slice_active_state,
03831d35f7499c87d51205817c93e9a8d42c4baestevel .sub_state_to_string = slice_sub_state_to_string,
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel .bus_interface = "org.freedesktop.systemd1.Slice",
03831d35f7499c87d51205817c93e9a8d42c4baestevel .bus_vtable = bus_slice_vtable,
03831d35f7499c87d51205817c93e9a8d42c4baestevel .bus_set_property = bus_slice_set_property,
03831d35f7499c87d51205817c93e9a8d42c4baestevel .bus_commit_properties = bus_slice_commit_properties,
03831d35f7499c87d51205817c93e9a8d42c4baestevel
03831d35f7499c87d51205817c93e9a8d42c4baestevel .status_message_formats = {
03831d35f7499c87d51205817c93e9a8d42c4baestevel .finished_start_job = {
03831d35f7499c87d51205817c93e9a8d42c4baestevel [JOB_DONE] = "Created slice %s.",
03831d35f7499c87d51205817c93e9a8d42c4baestevel [JOB_DEPENDENCY] = "Dependency failed for %s.",
03831d35f7499c87d51205817c93e9a8d42c4baestevel },
03831d35f7499c87d51205817c93e9a8d42c4baestevel .finished_stop_job = {
03831d35f7499c87d51205817c93e9a8d42c4baestevel [JOB_DONE] = "Removed slice %s.",
03831d35f7499c87d51205817c93e9a8d42c4baestevel },
03831d35f7499c87d51205817c93e9a8d42c4baestevel },
03831d35f7499c87d51205817c93e9a8d42c4baestevel};
03831d35f7499c87d51205817c93e9a8d42c4baestevel