]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
MountImages: actually support optional paths
authorLuca Boccassi <luca.boccassi@microsoft.com>
Thu, 28 Jan 2021 13:25:41 +0000 (13:25 +0000)
committerLuca Boccassi <luca.boccassi@microsoft.com>
Tue, 16 Feb 2021 14:33:23 +0000 (14:33 +0000)
ENOENT did not cause an image mount to be skipped, fix it

src/core/namespace.c

index 4ed0991b56d199be0e858b033e7da76e2bf1e456..d98a53a39afe2a29326ca7c3578356fe7c1396fc 100644 (file)
@@ -984,6 +984,8 @@ static int mount_images(const MountEntry *m) {
         assert(m);
 
         r = verity_dissect_and_mount(mount_entry_source(m), mount_entry_path(m), m->image_options);
+        if (r == -ENOENT && m->ignore)
+                return 0;
         if (r < 0)
                 return log_debug_errno(r, "Failed to mount image %s on %s: %m", mount_entry_source(m), mount_entry_path(m));