chiark / gitweb /
readahead: fix calculation of percentage
[elogind.git] / src / core / mount.c
index 5364b5dd7c34afe79401f2ff3afb8750aab2aa64..3d513a051e4c88d8899da26b0a3d1eafcb9db5b4 100644 (file)
@@ -618,7 +618,11 @@ static int mount_load(Unit *u) {
         assert(u);
         assert(u->load_state == UNIT_STUB);
 
-        r = unit_load_fragment_and_dropin_optional(u);
+        if (m->from_proc_self_mountinfo)
+                r = unit_load_fragment_and_dropin_optional(u);
+        else
+                r = unit_load_fragment_and_dropin(u);
+
         if (r < 0)
                 return r;
 
@@ -1436,6 +1440,14 @@ static int mount_add_one(
         } else {
                 delete = false;
                 free(e);
+
+                if (u->load_state == UNIT_ERROR) {
+                        u->load_state = UNIT_LOADED;
+                        u->load_error = 0;
+                        r = mount_add_extras(MOUNT(u));
+                        if (r < 0)
+                                goto fail;
+                }
         }
 
         if (!(w = strdup(what)) ||