From: Ivan Kruglov Date: Fri, 11 Jul 2025 10:19:41 +0000 (-0700) Subject: core: leave comments in varlink-unit.c and varlink-cgroup.c about runtime/context... X-Git-Tag: v258-rc1~69^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F38172%2Fhead;p=thirdparty%2Fsystemd.git core: leave comments in varlink-unit.c and varlink-cgroup.c about runtime/context split --- diff --git a/src/core/varlink-cgroup.c b/src/core/varlink-cgroup.c index 59c0a0f15ba..88d13f3c45b 100644 --- a/src/core/varlink-cgroup.c +++ b/src/core/varlink-cgroup.c @@ -269,6 +269,10 @@ int unit_cgroup_context_build_json(sd_json_variant **ret, const char *name, void return 0; } + /* The main principle behind context/runtime split is the following: + * If it make sense to place a property into a config/unit file it belongs to Context. + * Otherwise it's a 'Runtime'. */ + return sd_json_buildo( ret, diff --git a/src/core/varlink-unit.c b/src/core/varlink-unit.c index 71ca5d4a7df..da02fa1cf87 100644 --- a/src/core/varlink-unit.c +++ b/src/core/varlink-unit.c @@ -104,6 +104,10 @@ static int unit_conditions_build_json(sd_json_variant **ret, const char *name, v static int unit_context_build_json(sd_json_variant **ret, const char *name, void *userdata) { Unit *u = ASSERT_PTR(userdata); + /* The main principle behind context/runtime split is the following: + * If it make sense to place a property into a config/unit file it belongs to Context. + * Otherwise it's a 'Runtime'. */ + return sd_json_buildo( ASSERT_PTR(ret), SD_JSON_BUILD_PAIR_STRING("Type", unit_type_to_string(u->type)),