chiark / gitweb /
Partially revert e62d8c394474
[elogind.git] / src / nspawn / nspawn.c
index 9268cbc246c6797d9030de4ee4d4f3f1694e5cf4..b8b692b47462929f6b2fe75992141f290b48705d 100644 (file)
@@ -537,8 +537,8 @@ static int setup_boot_id(const char *dest) {
         if (mount(from, to, "bind", MS_BIND, NULL) < 0) {
                 log_error("Failed to bind mount boot id: %m");
                 r = -errno;
-        } else
-                mount(from, to, "bind", MS_BIND|MS_REMOUNT|MS_RDONLY, NULL);
+        } else if (mount(from, to, "bind", MS_BIND|MS_REMOUNT|MS_RDONLY, NULL))
+                log_warning("Failed to make boot id read-only: %m");
 
         unlink(from);
         return r;