32 lines
1.5 KiB
Diff
32 lines
1.5 KiB
Diff
|
From c44ecd40ed4b4221dd9f03f5c2090d994889064c Mon Sep 17 00:00:00 2001
|
||
|
From: Mike Yuan <me@yhndnzj.com>
|
||
|
Date: Tue, 23 Jan 2024 11:30:15 +0100
|
||
|
Subject: [PATCH 5004/5011] 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.
|
||
|
|
||
|
(cherry picked from commit 3f362012ce0034dc14d3c1a1c2a3a64a11efa9da)
|
||
|
|
||
|
[mkoutny: Drop MemoryPeak=]
|
||
|
---
|
||
|
src/shared/bus-print-properties.c | 1 +
|
||
|
1 file changed, 1 insertion(+)
|
||
|
|
||
|
diff --git a/src/shared/bus-print-properties.c b/src/shared/bus-print-properties.c
|
||
|
index db41ad2495..46724c98fa 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", "TasksCurrent") && u == UINT64_MAX) ||
|
||
|
+ (startswith(name, "Memory") && ENDSWITH_SET(name, "Current") && u == CGROUP_LIMIT_MAX) ||
|
||
|
(endswith(name, "NSec") && u == UINT64_MAX))
|
||
|
|
||
|
bus_print_property_value(name, expected_value, flags, "[not set]");
|
||
|
--
|
||
|
2.35.3
|
||
|
|