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