return -EINVAL;
if (mode != UNIT_CHECK) {
+ _cleanup_free_ char *contents = NULL;
const char *description;
dbus_message_iter_get_basic(i, &description);
r = unit_set_description(u, description);
if (r < 0)
return r;
+
+ contents = strjoin("[Unit]\nDescription=", description, "\n", NULL);
+ if (!contents)
+ return -ENOMEM;
+
+ unit_write_drop_in(u, mode, "Description", contents);
}
return 1;
if (mode != UNIT_CHECK)
unit_ref_unset(&u->slice);
} else {
+ _cleanup_free_ char *contents = NULL;
+
r = manager_load_unit(u->manager, s, NULL, error, &slice);
if (r < 0)
return r;
if (mode != UNIT_CHECK)
unit_ref_set(&u->slice, slice);
+
+ contents = strjoin("[", UNIT_VTABLE(u)->private_section, "]\nSlice=", s, NULL);
+ if (!contents)
+ return -ENOMEM;
+
+ unit_write_drop_in(u, mode, "Slice", contents);
}
return 1;
}
Path.DirectoryMode, config_parse_mode, 0, offsetof(Path, directory_mode)
m4_dnl
CGROUP_CONTEXT_CONFIG_ITEMS(Slice)m4_dnl
+m4_dnl
+CGROUP_CONTEXT_CONFIG_ITEMS(Scope)m4_dnl
m4_dnl The [Install] section is ignored here.
Install.Alias, NULL, 0, 0
Install.WantedBy, NULL, 0, 0