chiark / gitweb /
build-sys: move more files from core/ to share/ that are generic enough
[elogind.git] / src / core / dbus-slice.c
1 /*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
2
3 /***
4   This file is part of systemd.
5
6   Copyright 2013 Lennart Poettering
7
8   systemd is free software; you can redistribute it and/or modify it
9   under the terms of the GNU Lesser General Public License as published by
10   the Free Software Foundation; either version 2.1 of the License, or
11   (at your option) any later version.
12
13   systemd is distributed in the hope that it will be useful, but
14   WITHOUT ANY WARRANTY; without even the implied warranty of
15   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16   Lesser General Public License for more details.
17
18   You should have received a copy of the GNU Lesser General Public License
19   along with systemd; If not, see <http://www.gnu.org/licenses/>.
20 ***/
21
22 #include "unit.h"
23 #include "slice.h"
24 #include "dbus-unit.h"
25 #include "dbus-cgroup.h"
26 #include "dbus-slice.h"
27
28 const sd_bus_vtable bus_slice_vtable[] = {
29         SD_BUS_VTABLE_START(0),
30         SD_BUS_VTABLE_END
31 };
32
33 int bus_slice_set_property(
34                 Unit *u,
35                 const char *name,
36                 sd_bus_message *message,
37                 UnitSetPropertiesMode mode,
38                 sd_bus_error *error) {
39
40         Slice *s = SLICE(u);
41
42         assert(name);
43         assert(u);
44
45         return bus_cgroup_set_property(u, &s->cgroup_context, name, message, mode, error);
46 }
47
48 int bus_slice_commit_properties(Unit *u) {
49         assert(u);
50
51         unit_realize_cgroup(u);
52         return 0;
53 }