chiark / gitweb /
mount: propagate error codes correctly
[elogind.git] / src / core / mount-setup.c
index 4713187e6c3c1b787000b4c42489f4f97b0ee149..9c9675085a26ee2ca40bf2293b729a7372451ebb 100644 (file)
@@ -227,7 +227,7 @@ int mount_setup_early(void) {
                 int j;
 
                 j = mount_one(mount_table + i, false);
-                if (r == 0)
+                if (j != 0 && r >= 0)
                         r = j;
         }
 
@@ -371,7 +371,7 @@ int mount_setup(bool loaded_policy) {
                 int j;
 
                 j = mount_one(mount_table + i, loaded_policy);
-                if (r == 0)
+                if (j != 0 && r >= 0)
                         r = j;
         }