info(" -r, --variable <name> Define parameter to set\n");
info(" --copy-from <source_cgroup_path> Control group whose ");
info("parameters will be copied\n");
+#ifdef WITH_SYSTEMD
+ info(" -b Ignore default systemd ");
+ info("delegate hierarchy\n");
+#endif
}
#endif /* !UNIT_TEST */
#ifndef UNIT_TEST
int main(int argc, char *argv[])
{
+ int ignore_default_systemd_delegate_slice = 0;
struct control_value *name_value = NULL;
int nv_number = 0;
int nv_max = 0;
return -1;
}
+#ifdef WITH_SYSTEMD
/* parse arguments */
+ while ((c = getopt_long (argc, argv, "r:h12ib", long_options, NULL)) != -1) {
+ switch (c) {
+ case 'b':
+ ignore_default_systemd_delegate_slice = 1;
+ break;
+#else
while ((c = getopt_long (argc, argv, "r:h12i", long_options, NULL)) != -1) {
switch (c) {
+#endif
case 'h':
usage(0, argv[0]);
ret = 0;
goto err;
}
+ /* this is false always for disable-systemd */
+ if (!ignore_default_systemd_delegate_slice)
+ cgroup_set_default_systemd_cgroup();
+
/* copy the name-value pairs from -r options */
if ((flags & FL_RULES) != 0) {
src_cgroup = create_cgroup_from_name_value_pairs("tmp", name_value, nv_number);