X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fbasic%2Fcgroup-util.c;h=b5de1cc143f55f9ec8c8ed719d22a873fb9eef75;hb=eaca07ccfdf5d7dabc50afc7e539c2413dd69d3e;hp=a0a61d8874c79c0d0d1d5430633503afa21d4ec6;hpb=3cd22db822df747636dcf30ebb8ec5d16bb71880;p=elogind.git diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c index a0a61d887..b5de1cc14 100644 --- a/src/basic/cgroup-util.c +++ b/src/basic/cgroup-util.c @@ -19,28 +19,39 @@ along with systemd; If not, see . ***/ +#include #include -#include +#include #include -#include #include -#include +#include #include #include -#include +#include -#include "set.h" -#include "macro.h" -#include "util.h" -#include "formats-util.h" -#include "process-util.h" -#include "path-util.h" -// #include "unit-name.h" +#include "alloc-util.h" +#include "cgroup-util.h" +#include "dirent-util.h" +#include "extract-word.h" +#include "fd-util.h" #include "fileio.h" -// #include "special.h" -#include "mkdir.h" +#include "formats-util.h" +#include "fs-util.h" #include "login-util.h" -#include "cgroup-util.h" +#include "macro.h" +#include "mkdir.h" +#include "parse-util.h" +#include "path-util.h" +#include "proc-cmdline.h" +#include "process-util.h" +#include "set.h" +//#include "special.h" +#include "stat-util.h" +#include "string-table.h" +#include "string-util.h" +#include "unit-name.h" +#include "user-util.h" +#include "util.h" int cg_enumerate_processes(const char *controller, const char *path, FILE **_f) { _cleanup_free_ char *fs = NULL; @@ -1159,7 +1170,7 @@ int cg_mangle_path(const char *path, char **result) { if (r < 0) return r; - return cg_get_path(c ? c : SYSTEMD_CGROUP_CONTROLLER, p ? p : "/", NULL, result); + return cg_get_path(c ?: SYSTEMD_CGROUP_CONTROLLER, p ?: "/", NULL, result); } int cg_get_root_path(char **path) { @@ -2281,6 +2292,8 @@ bool cg_is_legacy_wanted(void) { } #endif // 0 +/// UNNEEDED by elogind +#if 0 int cg_cpu_shares_parse(const char *s, uint64_t *ret) { uint64_t u; int r; @@ -2319,7 +2332,8 @@ int cg_blkio_weight_parse(const char *s, uint64_t *ret) { *ret = u; return 0; - } +} +#endif // 0 static const char *cgroup_controller_table[_CGROUP_CONTROLLER_MAX] = { [CGROUP_CONTROLLER_CPU] = "cpu",