]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
bus-unit-util: generate proper log message when we fail to parse properties 18798/head
authorLennart Poettering <lennart@poettering.net>
Thu, 25 Feb 2021 12:38:20 +0000 (13:38 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 25 Feb 2021 12:38:20 +0000 (13:38 +0100)
src/shared/bus-unit-util.c

index ce9ae89fe6658e52f9150389c15788f04f62586d..a58495dbf84b352e99b2f80dd1bf61984189bc65 100644 (file)
@@ -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 */