]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
nspawn: log at error level before exiting if parsing OCI fails
authorLuca Boccassi <luca.boccassi@gmail.com>
Wed, 15 Jul 2026 14:39:40 +0000 (15:39 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Thu, 16 Jul 2026 16:41:27 +0000 (17:41 +0100)
Currently it silently errors out, with nothing at all printed on the
console

Follow-up for de40a3037af944f6803375f2f5269cffc4247f56

src/nspawn/nspawn-oci.c

index f92e1e416b4e19b9647a67d88271a56384f022f4..e113a6097bca2b87b6e1e454a7173a4e0ee6a40b 100644 (file)
@@ -2123,9 +2123,9 @@ int oci_load(FILE *f, const char *bundle, Settings **ret) {
         if (!s->bundle)
                 return log_oom();
 
-        r = oci_dispatch(oci, table, 0, s);
+        r = oci_dispatch(oci, table, /* flags= */ 0, s);
         if (r < 0)
-                return r;
+                return log_error_errno(r, "Failed to parse OCI bundle configuration file '%s': %m", path);
 
         if (s->properties) {
                 r = sd_bus_message_seal(s->properties, 0, 0);