From: Peter Krempa Date: Tue, 1 Aug 2023 13:32:16 +0000 (+0200) Subject: virLXCControllerSetupUsernsMap: Modify debug logging for clean startup errors X-Git-Tag: v9.7.0-rc1~157 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4b57c5fecf928e10ee04b7e411ddc3c9cc6078c2;p=thirdparty%2Flibvirt.git virLXCControllerSetupUsernsMap: Modify debug logging for clean startup errors Avoid logging multiline debug logs so that the function which attempts to extract a non-debug log error message can work properly. Signed-off-by: Peter Krempa Reviewed-by: Martin Kletzander --- diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c index 51459b47e7..d79b8e1dd6 100644 --- a/src/lxc/lxc_controller.c +++ b/src/lxc/lxc_controller.c @@ -1359,11 +1359,13 @@ virLXCControllerSetupUsernsMap(virDomainIdMapEntry *map, return -1; } - for (i = 0; i < num; i++) + VIR_DEBUG("Set '%s' mappings to:", path); + + for (i = 0; i < num; i++) { + VIR_DEBUG("%u %u %u", map[i].start, map[i].target, map[i].count); virBufferAsprintf(&map_value, "%u %u %u\n", map[i].start, map[i].target, map[i].count); - - VIR_DEBUG("Set '%s' to '%s'", path, virBufferCurrentContent(&map_value)); + } if (virFileWriteStr(path, virBufferCurrentContent(&map_value), 0) < 0) { virReportSystemError(errno, _("unable write to %1$s"), path);