return 1;
}
-/// UNNEEDED by elogind
-#if 0
int cg_create_and_attach(const char *controller, const char *path, pid_t pid) {
int r, q;
/* This does not remove the cgroup on failure */
return r;
}
-#endif // 0
int cg_attach(const char *controller, const char *path, pid_t pid) {
_cleanup_free_ char *fs = NULL;
return -ENODATA;
}
-/// UNNEEDED by elogind
-#if 0
int cg_install_release_agent(const char *controller, const char *agent) {
_cleanup_free_ char *fs = NULL, *contents = NULL;
const char *sc;
return 0;
}
-#endif // 0
int cg_is_empty(const char *controller, const char *path) {
_cleanup_fclose_ FILE *f = NULL;
return 0;
}
+#endif // 0
int cg_set_attribute(const char *controller, const char *path, const char *attribute, const char *value) {
_cleanup_free_ char *p = NULL;
return write_string_file_no_create(p, value);
}
+/// UNNEEDED by elogind
+#if 0
int cg_get_attribute(const char *controller, const char *path, const char *attribute, char **ret) {
_cleanup_free_ char *p = NULL;
int r;
return read_one_line_file(p, ret);
}
-#endif // 0
-/// UNNEEDED by elogind
-#if 0
int cg_create_everywhere(CGroupMask supported, CGroupMask mask, const char *path) {
CGroupController c;
int r, unified;
return 0;
}
+#endif // 0
int cg_mask_supported(CGroupMask *ret) {
CGroupMask mask = 0;
return 0;
}
+/// UNNEEDED by elogind
+#if 0
int cg_kernel_controllers(Set *controllers) {
_cleanup_fclose_ FILE *f = NULL;
char buf[LINE_MAX];
if (statfs("/sys/fs/cgroup/", &fs) < 0)
return -errno;
+/// elogind can not support the unified hierarchy as a controller,
+/// so always assume a classical hierarchy.
+/// If, ond only *if*, someone really wants to substitute systemd-login
+/// in an environment managed by systemd with elogin, we might have to
+/// add such a support.
+#if 0
if (F_TYPE_EQUAL(fs.f_type, CGROUP_SUPER_MAGIC))
unified_cache = true;
else if (F_TYPE_EQUAL(fs.f_type, TMPFS_MAGIC))
+#else
+ if (F_TYPE_EQUAL(fs.f_type, TMPFS_MAGIC))
+#endif // elogind
unified_cache = false;
else
return -ENOEXEC;