Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
pivot_path = must_make_path(h->mountpoint,
h->container_base_path,
conf->cgroup_meta.dir,
- "lxc.pivot",
+ PIVOT_CGROUP,
"cgroup.procs", NULL);
else
pivot_path = must_make_path(h->mountpoint,
h->container_base_path,
- "lxc.pivot",
+ PIVOT_CGROUP,
"cgroup.procs", NULL);
ret = mkdir_p(pivot_path, 0755);
return false;
}
ops->cgroup_pattern = must_copy_string(cgroup_pattern);
- ops->monitor_pattern = must_copy_string("lxc.monitor");
+ ops->monitor_pattern = MONITOR_CGROUP;
return true;
}
free(ops->cgroup_pattern);
free(ops->container_cgroup);
- free(ops->monitor_pattern);
for (it = ops->hierarchies; it && *it; it++) {
char **ctrlr;
#include <stddef.h>
#include <sys/types.h>
+#define PAYLOAD_CGROUP "lxc.payload"
+#define MONITOR_CGROUP "lxc.monitor"
+#define PIVOT_CGROUP "lxc.pivot"
+
struct lxc_handler;
struct lxc_conf;
struct lxc_list;
char **cgroup_use;
char *cgroup_pattern;
char *container_cgroup;
+
+ /* Static memory, do not free.*/
char *monitor_pattern;
/* @hierarchies