From: Lennart Poettering Date: Thu, 25 Feb 2021 12:38:20 +0000 (+0100) Subject: bus-unit-util: generate proper log message when we fail to parse properties X-Git-Tag: v248-rc3~110^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F18798%2Fhead;p=thirdparty%2Fsystemd.git bus-unit-util: generate proper log message when we fail to parse properties --- diff --git a/src/shared/bus-unit-util.c b/src/shared/bus-unit-util.c index ce9ae89fe66..a58495dbf84 100644 --- a/src/shared/bus-unit-util.c +++ b/src/shared/bus-unit-util.c @@ -1679,14 +1679,14 @@ static int bus_append_execute_property(sd_bus_message *m, const char *field, con r = extract_first_word(&p, &tuple, NULL, EXTRACT_UNQUOTE|EXTRACT_RETAIN_ESCAPE); if (r < 0) - return r; + return log_error_errno(r, "Failed to parse MountImages= property: %s", eq); if (r == 0) break; q = tuple; r = extract_many_words(&q, ":", EXTRACT_CUNESCAPE|EXTRACT_UNESCAPE_SEPARATORS, &first, &second, NULL); if (r < 0) - return r; + return log_error_errno(r, "Failed to parse MountImages= property: %s", eq); if (r == 0) continue; @@ -1718,7 +1718,7 @@ static int bus_append_execute_property(sd_bus_message *m, const char *field, con r = extract_many_words(&q, ":", EXTRACT_CUNESCAPE|EXTRACT_UNESCAPE_SEPARATORS, &partition, &mount_options, NULL); if (r < 0) - return r; + return log_error_errno(r, "Failed to parse MountImages= property: %s", eq); if (r == 0) break; /* Single set of options, applying to the root partition/single filesystem */ @@ -1785,14 +1785,14 @@ static int bus_append_execute_property(sd_bus_message *m, const char *field, con r = extract_first_word(&p, &tuple, NULL, EXTRACT_UNQUOTE|EXTRACT_RETAIN_ESCAPE); if (r < 0) - return r; + return log_error_errno(r, "Failed to parse ExtensionImages= property: %s", eq); if (r == 0) break; q = tuple; r = extract_first_word(&q, &source, ":", EXTRACT_CUNESCAPE|EXTRACT_UNESCAPE_SEPARATORS); if (r < 0) - return r; + return log_error_errno(r, "Failed to parse ExtensionImages= property: %s", eq); if (r == 0) continue; @@ -1819,7 +1819,7 @@ static int bus_append_execute_property(sd_bus_message *m, const char *field, con r = extract_many_words(&q, ":", EXTRACT_CUNESCAPE|EXTRACT_UNESCAPE_SEPARATORS, &partition, &mount_options, NULL); if (r < 0) - return r; + return log_error_errno(r, "Failed to parse ExtensionImages= property: %s", eq); if (r == 0) break; /* Single set of options, applying to the root partition/single filesystem */