]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
bus-print-properties: prettify more unset properties
authorMike Yuan <me@yhndnzj.com>
Fri, 24 Nov 2023 15:31:55 +0000 (23:31 +0800)
committerMike Yuan <me@yhndnzj.com>
Fri, 24 Nov 2023 16:38:49 +0000 (00:38 +0800)
src/shared/bus-print-properties.c

index 62b9cf1bf4ae9b3b5766dce860db6b19414449ac..6704e1ef3dfa8ae5b070832fd3d8798c86beebb5 100644 (file)
@@ -159,11 +159,13 @@ static int bus_print_property(const char *name, const char *expected_value, sd_b
                            (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) ||
+                           (startswith(name, "IO") && ENDSWITH_SET(name, "Bytes", "Operations") && u == UINT64_MAX) ||
                            (endswith(name, "NSec") && u == UINT64_MAX))
 
                         bus_print_property_value(name, expected_value, flags, "[not set]");
 
-                else if ((STR_IN_SET(name, "DefaultMemoryLow", "DefaultMemoryMin", "MemoryLow", "MemoryHigh", "MemoryMax", "MemorySwapMax", "MemoryZSwapMax", "MemoryLimit") && u == CGROUP_LIMIT_MAX) ||
+                else if ((ENDSWITH_SET(name, "MemoryLow", "MemoryMin", "MemoryHigh", "MemoryMax", "MemorySwapMax", "MemoryZSwapMax", "MemoryLimit") &&
+                          u == CGROUP_LIMIT_MAX) ||
                          (STR_IN_SET(name, "TasksMax", "DefaultTasksMax") && u == UINT64_MAX) ||
                          (startswith(name, "Limit") && u == UINT64_MAX) ||
                          (startswith(name, "DefaultLimit") && u == UINT64_MAX))