]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
systemctl-show: drop BlockIO* property formatter
authorMike Yuan <me@yhndnzj.com>
Wed, 14 May 2025 16:39:50 +0000 (18:39 +0200)
committerMike Yuan <me@yhndnzj.com>
Thu, 15 May 2025 00:19:15 +0000 (02:19 +0200)
src/shared/bus-print-properties.c
src/systemctl/systemctl-show.c

index 9ac6ddb3a9c64c3622f2ebfe221cf10bf5298e39..ec7e2c95439bf040efcc43503f35c26d435e32bd 100644 (file)
@@ -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) ||
index 84dc1ff9eac59aef847b92b8cd6cd04ed0fc141e..47d519a4ab7cadbdc2b69228e3af91f8aa97b954 100644 (file)
@@ -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;