core: improve dbus-cgroup error message

As suggested by @keszybz in the review of #6764
This commit is contained in:
Lennart Poettering 2017-09-26 16:18:50 +02:00
parent 9782c78794
commit 4fe66c8681

View File

@ -1247,7 +1247,7 @@ int bus_cgroup_set_property(
return r;
if (!IN_SET(family, AF_INET, AF_INET6))
return sd_bus_error_set_errnof(error, EINVAL, "IPAddressAllow= expects IPv4 or IPv6 addresses only.");
return sd_bus_error_set_errnof(error, EINVAL, "%s= expects IPv4 or IPv6 addresses only.", name);
r = sd_bus_message_read_array(message, 'y', &ap, &an);
if (r < 0)
@ -1262,7 +1262,7 @@ int bus_cgroup_set_property(
return r;
if (prefixlen > FAMILY_ADDRESS_SIZE(family)*8)
return sd_bus_error_set_errnof(error, EINVAL, "Prefix length too large for family.");
return sd_bus_error_set_errnof(error, EINVAL, "Prefix length %" PRIu32 " too large for address family %s.", prefixlen, af_to_name(family));
if (mode != UNIT_CHECK) {
IPAddressAccessItem *item;