From 5fde5c0399204213bbdbd42cb9f54b10275bfff4 Mon Sep 17 00:00:00 2001 From: Mike Yuan Date: Wed, 14 May 2025 18:39:50 +0200 Subject: [PATCH] systemctl-show: drop BlockIO* property formatter --- src/shared/bus-print-properties.c | 1 - src/systemctl/systemctl-show.c | 6 ++---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/shared/bus-print-properties.c b/src/shared/bus-print-properties.c index 9ac6ddb3a9..ec7e2c9543 100644 --- a/src/shared/bus-print-properties.c +++ b/src/shared/bus-print-properties.c @@ -164,7 +164,6 @@ static int bus_print_property(const char *name, const char *expected_value, sd_b else if ((STR_IN_SET(name, "CPUWeight", "StartupCPUWeight", "IOWeight", "StartupIOWeight") && u == CGROUP_WEIGHT_INVALID) || (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) || (startswith(name, "IO") && ENDSWITH_SET(name, "Bytes", "Operations") && u == UINT64_MAX) || diff --git a/src/systemctl/systemctl-show.c b/src/systemctl/systemctl-show.c index 84dc1ff9ea..47d519a4ab 100644 --- a/src/systemctl/systemctl-show.c +++ b/src/systemctl/systemctl-show.c @@ -1505,8 +1505,7 @@ static int print_property(const char *name, const char *expected_value, sd_bus_m return 1; - } else if (contents[0] == SD_BUS_TYPE_STRUCT_BEGIN && - STR_IN_SET(name, "IODeviceWeight", "BlockIODeviceWeight")) { + } else if (contents[0] == SD_BUS_TYPE_STRUCT_BEGIN && streq(name, "IODeviceWeight")) { const char *path; uint64_t weight; @@ -1526,8 +1525,7 @@ static int print_property(const char *name, const char *expected_value, sd_bus_m return 1; } else if (contents[0] == SD_BUS_TYPE_STRUCT_BEGIN && - (cgroup_io_limit_type_from_string(name) >= 0 || - STR_IN_SET(name, "BlockIOReadBandwidth", "BlockIOWriteBandwidth"))) { + cgroup_io_limit_type_from_string(name) >= 0) { const char *path; uint64_t bandwidth;