]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
conf-parser: print why config_parse_iec_uint64() fails 33426/head
authorAntonio Alvarez Feijoo <antonio.feijoo@suse.com>
Thu, 20 Jun 2024 10:54:32 +0000 (12:54 +0200)
committerAntonio Alvarez Feijoo <antonio.feijoo@suse.com>
Thu, 20 Jun 2024 10:54:32 +0000 (12:54 +0200)
Print the same output as `config_parse_iec_size()` and
`config_parse_si_uint64()` if `parse_size()` fails, not only the `rvalue`.

src/shared/conf-parser.c

index 7bac3ead83de657d5b8cb549204fc4a987d0818f..67c6aa792e3f7a01337acd8986159311b44db14c 100644 (file)
@@ -946,7 +946,7 @@ int config_parse_iec_uint64(
 
         r = parse_size(rvalue, 1024, bytes);
         if (r < 0)
-                log_syntax(unit, LOG_WARNING, filename, line, r, "Failed to parse size value, ignoring: %s", rvalue);
+                log_syntax(unit, LOG_WARNING, filename, line, r, "Failed to parse size value '%s', ignoring: %m", rvalue);
 
         return 0;
 }