dbus-cgroup: fix swapped arguments in "not normalized" error messages

The IO*Max=, IODeviceWeight= and IODeviceLatencyTargetSec= handlers
passed the property name and the path in the wrong order, resulting in
messages such as "Path 'IOReadBandwidthMax' specified in /var/= is not
normalized."
This commit is contained in:
Lennart Poettering authored and Lennart Poettering committed 2026-11-05 18:54:15 +01:00
1 parent b308d3ef58
commit bc97dd19ef
1 file changed
+3 -3
+3 -3
View File
@@ -1253,7 +1253,7 @@ int bus_cgroup_set_property(
while ((r = sd_bus_message_read(message, "(st)", &path, &u64)) > 0) {
if (!path_is_normalized(path))
return sd_bus_error_setf(reterr_error, SD_BUS_ERROR_INVALID_ARGS, "Path '%s' specified in %s= is not normalized.", name, path);
return sd_bus_error_setf(reterr_error, SD_BUS_ERROR_INVALID_ARGS, "Path '%s' specified in %s= is not normalized.", path, name);
if (!UNIT_WRITE_FLAGS_NOOP(flags)) {
CGroupIODeviceLimit *a = NULL;
@@ -1336,7 +1336,7 @@ int bus_cgroup_set_property(
while ((r = sd_bus_message_read(message, "(st)", &path, &weight)) > 0) {
if (!path_is_normalized(path))
return sd_bus_error_setf(reterr_error, SD_BUS_ERROR_INVALID_ARGS, "Path '%s' specified in %s= is not normalized.", name, path);
return sd_bus_error_setf(reterr_error, SD_BUS_ERROR_INVALID_ARGS, "Path '%s' specified in %s= is not normalized.", path, name);
if (!CGROUP_WEIGHT_IS_OK(weight) || weight == CGROUP_WEIGHT_INVALID)
return sd_bus_error_set(reterr_error, SD_BUS_ERROR_INVALID_ARGS, "IODeviceWeight= value out of range");
@@ -1413,7 +1413,7 @@ int bus_cgroup_set_property(
while ((r = sd_bus_message_read(message, "(st)", &path, &target)) > 0) {
if (!path_is_normalized(path))
return sd_bus_error_setf(reterr_error, SD_BUS_ERROR_INVALID_ARGS, "Path '%s' specified in %s= is not normalized.", name, path);
return sd_bus_error_setf(reterr_error, SD_BUS_ERROR_INVALID_ARGS, "Path '%s' specified in %s= is not normalized.", path, name);
if (!UNIT_WRITE_FLAGS_NOOP(flags)) {
CGroupIODeviceLatency *a = NULL;