core: io.systemd.Unit.List can lookup unit by CGroup

This commit is contained in:
Ivan Kruglov
2025-10-20 03:58:39 -07:00
parent 4ddd3fe1fb
commit 6b78d931cd
2 changed files with 23 additions and 5 deletions
+2
View File
@@ -1017,6 +1017,8 @@ static SD_VARLINK_DEFINE_METHOD_FULL(
SD_VARLINK_DEFINE_INPUT(name, SD_VARLINK_STRING, SD_VARLINK_NULLABLE),
SD_VARLINK_FIELD_COMMENT("If non-null the PID of a unit. Special value 0 means to take pid of the caller."),
SD_VARLINK_DEFINE_INPUT_BY_TYPE(pid, ProcessId, SD_VARLINK_NULLABLE),
SD_VARLINK_FIELD_COMMENT("If non-null the cgroup of a unit"),
SD_VARLINK_DEFINE_INPUT(cgroup, SD_VARLINK_STRING, SD_VARLINK_NULLABLE),
SD_VARLINK_FIELD_COMMENT("Configuration of the unit"),
SD_VARLINK_DEFINE_OUTPUT_BY_TYPE(context, UnitContext, 0),
SD_VARLINK_FIELD_COMMENT("Runtime information of the unit"),