From: Mike Yuan Date: Wed, 14 May 2025 16:39:50 +0000 (+0200) Subject: systemctl-show: drop BlockIO* property formatter X-Git-Tag: v258-rc1~595^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5fde5c0399204213bbdbd42cb9f54b10275bfff4;p=thirdparty%2Fsystemd.git systemctl-show: drop BlockIO* property formatter --- diff --git a/src/shared/bus-print-properties.c b/src/shared/bus-print-properties.c index 9ac6ddb3a9c..ec7e2c95439 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 84dc1ff9eac..47d519a4ab7 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;