]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/core/cgroup-attr.h
relicense to LGPLv2.1 (with exceptions)
[thirdparty/systemd.git] / src / core / cgroup-attr.h
CommitLineData
ab1f0633
LP
1/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
2
3#ifndef foocgroupattrhfoo
4#define foocgroupattrhfoo
5
6/***
7 This file is part of systemd.
8
9 Copyright 2011 Lennart Poettering
10
11 systemd is free software; you can redistribute it and/or modify it
5430f7f2
LP
12 under the terms of the GNU Lesser General Public License as published by
13 the Free Software Foundation; either version 2.1 of the License, or
ab1f0633
LP
14 (at your option) any later version.
15
16 systemd is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5430f7f2 19 Lesser General Public License for more details.
ab1f0633 20
5430f7f2 21 You should have received a copy of the GNU Lesser General Public License
ab1f0633
LP
22 along with systemd; If not, see <http://www.gnu.org/licenses/>.
23***/
24
25typedef struct CGroupAttribute CGroupAttribute;
26
27typedef int (*CGroupAttributeMapCallback)(const char *controller, const char*name, const char *value, char **ret);
28
29#include "unit.h"
30#include "cgroup.h"
31
32struct CGroupAttribute {
33 char *controller;
34 char *name;
35 char *value;
36
37 CGroupAttributeMapCallback map_callback;
38
39 LIST_FIELDS(CGroupAttribute, by_unit);
40};
41
42int cgroup_attribute_apply(CGroupAttribute *a, CGroupBonding *b);
43int cgroup_attribute_apply_list(CGroupAttribute *first, CGroupBonding *b);
44
45CGroupAttribute *cgroup_attribute_find_list(CGroupAttribute *first, const char *controller, const char *name);
46
47void cgroup_attribute_free_list(CGroupAttribute *first);
48
49#endif