]>
Commit | Line | Data |
---|---|---|
a016b922 LP |
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 | ||
718db961 LP |
22 | #include "unit.h" |
23 | #include "slice.h" | |
a016b922 | 24 | #include "dbus-unit.h" |
4ad49000 | 25 | #include "dbus-cgroup.h" |
4ad49000 | 26 | #include "dbus-slice.h" |
a016b922 | 27 | |
718db961 LP |
28 | const sd_bus_vtable bus_slice_vtable[] = { |
29 | SD_BUS_VTABLE_START(0), | |
30 | SD_BUS_VTABLE_END | |
31 | }; | |
8e2af478 LP |
32 | |
33 | int bus_slice_set_property( | |
34 | Unit *u, | |
35 | const char *name, | |
718db961 | 36 | sd_bus_message *message, |
8e2af478 | 37 | UnitSetPropertiesMode mode, |
718db961 | 38 | sd_bus_error *error) { |
8e2af478 LP |
39 | |
40 | Slice *s = SLICE(u); | |
8e2af478 LP |
41 | |
42 | assert(name); | |
43 | assert(u); | |
8e2af478 | 44 | |
718db961 | 45 | return bus_cgroup_set_property(u, &s->cgroup_context, name, message, mode, error); |
8e2af478 LP |
46 | } |
47 | ||
48 | int bus_slice_commit_properties(Unit *u) { | |
49 | assert(u); | |
50 | ||
51 | unit_realize_cgroup(u); | |
52 | return 0; | |
53 | } |