chiark / gitweb /
Prep v239: Unmask cg_weight_parse()
[elogind.git] / src / basic / cgroup-util.h
index 455921d37d5af8bfa307a8cc98aee435972e2684..25e634deacc21fd6bd2d9e4bcdb0d5d40c9ca9b6 100644 (file)
@@ -1,25 +1,6 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 #pragma once
 
-/***
-  This file is part of systemd.
-
-  Copyright 2010 Lennart Poettering
-
-  systemd is free software; you can redistribute it and/or modify it
-  under the terms of the GNU Lesser General Public License as published by
-  the Free Software Foundation; either version 2.1 of the License, or
-  (at your option) any later version.
-
-  systemd is distributed in the hope that it will be useful, but
-  WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-  Lesser General Public License for more details.
-
-  You should have received a copy of the GNU Lesser General Public License
-  along with systemd; If not, see <http://www.gnu.org/licenses/>.
-***/
-
 #include <dirent.h>
 #include <stdbool.h>
 #include <stdint.h>
@@ -33,9 +14,9 @@
 #include "set.h"
 
 #if 0 /// elogind has them set through config.h
-#define SYSTEMD_CGROUP_CONTROLLER_LEGACY "name=elogind"
+#define SYSTEMD_CGROUP_CONTROLLER_LEGACY "name=systemd"
 #define SYSTEMD_CGROUP_CONTROLLER_HYBRID "name=unified"
-#define SYSTEMD_CGROUP_CONTROLLER "_elogind"
+#define SYSTEMD_CGROUP_CONTROLLER "_systemd"
 #endif // 0
 
 /* An enum of well known cgroup controllers */
@@ -195,7 +176,7 @@ int cg_create_and_attach(const char *controller, const char *path, pid_t pid);
 int cg_set_attribute(const char *controller, const char *path, const char *attribute, const char *value);
 int cg_get_attribute(const char *controller, const char *path, const char *attribute, char **ret);
 #if 0 /// UNNEEDED by elogind
-int cg_get_keyed_attribute(const char *controller, const char *path, const char *attribute, const char **keys, char **values);
+int cg_get_keyed_attribute(const char *controller, const char *path, const char *attribute, char **keys, char **values);
 
 int cg_set_access(const char *controller, const char *path, uid_t uid, gid_t gid);
 
@@ -213,8 +194,8 @@ int cg_get_root_path(char **path);
 
 int cg_path_get_session(const char *path, char **session);
 int cg_path_get_owner_uid(const char *path, uid_t *uid);
-#if 0 /// UNNEEDED by elogind
 int cg_path_get_unit(const char *path, char **unit);
+#if 0 /// UNNEEDED by elogind
 int cg_path_get_user_unit(const char *path, char **unit);
 int cg_path_get_machine_name(const char *path, char **machine);
 #endif // 0
@@ -226,17 +207,15 @@ int cg_pid_get_path_shifted(pid_t pid, const char *cached_root, char **cgroup);
 
 int cg_pid_get_session(pid_t pid, char **session);
 int cg_pid_get_owner_uid(pid_t pid, uid_t *uid);
-#if 0 /// UNNEEDED by elogind
 int cg_pid_get_unit(pid_t pid, char **unit);
+#if 0 /// UNNEEDED by elogind
 int cg_pid_get_user_unit(pid_t pid, char **unit);
 int cg_pid_get_machine_name(pid_t pid, char **machine);
 #endif // 0
 int cg_pid_get_slice(pid_t pid, char **slice);
 int cg_pid_get_user_slice(pid_t pid, char **slice);
 
-#if 0 /// UNNEEDED by elogind
 int cg_path_decode_unit(const char *cgroup, char **unit);
-#endif // 0
 
 char *cg_escape(const char *p);
 char *cg_unescape(const char *p) _pure_;
@@ -278,8 +257,8 @@ bool cg_is_hybrid_wanted(void);
 const char* cgroup_controller_to_string(CGroupController c) _const_;
 CGroupController cgroup_controller_from_string(const char *s) _pure_;
 
-#if 0 /// UNNEEDED by elogind
 int cg_weight_parse(const char *s, uint64_t *ret);
+#if 0 /// UNNEEDED by elogind
 int cg_cpu_shares_parse(const char *s, uint64_t *ret);
 int cg_blkio_weight_parse(const char *s, uint64_t *ret);
 #endif // 0