From: Mike Yuan Date: Fri, 24 Nov 2023 11:15:40 +0000 (+0800) Subject: bus-print-properties: ignore CGROUP_LIMIT_MAX for Memory*{Current,Peak} X-Git-Tag: v255-rc4~55^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3f362012ce0034dc14d3c1a1c2a3a64a11efa9da;p=thirdparty%2Fsystemd.git bus-print-properties: ignore CGROUP_LIMIT_MAX for Memory*{Current,Peak} MemoryCurrent and MemoryAvailable are shown as "[not set]" when UINT64_MAX (unset). Let's do the same for the newly-added Memory*{Current,Peak} properties. --- diff --git a/src/shared/bus-print-properties.c b/src/shared/bus-print-properties.c index 8999a1a4fad..62b9cf1bf4a 100644 --- a/src/shared/bus-print-properties.c +++ b/src/shared/bus-print-properties.c @@ -158,6 +158,7 @@ static int bus_print_property(const char *name, const char *expected_value, sd_b (STR_IN_SET(name, "CPUShares", "StartupCPUShares") && u == CGROUP_CPU_SHARES_INVALID) || (STR_IN_SET(name, "BlockIOWeight", "StartupBlockIOWeight") && u == CGROUP_BLKIO_WEIGHT_INVALID) || (STR_IN_SET(name, "MemoryCurrent", "MemoryAvailable", "TasksCurrent") && u == UINT64_MAX) || + (startswith(name, "Memory") && ENDSWITH_SET(name, "Current", "Peak") && u == CGROUP_LIMIT_MAX) || (endswith(name, "NSec") && u == UINT64_MAX)) bus_print_property_value(name, expected_value, flags, "[not set]");