mirror of
https://github.com/systemd/systemd.git
synced 2026-11-06 05:17:24 +00:00
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:
1 parent
b308d3ef58
commit
bc97dd19ef
1 file changed
+3
-3
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user