chiark / gitweb /
journald: properly update message size after stripping the identifier
[elogind.git] / src / core / mount.c
index 66ef0cd25c3714bee713c738d7bda7483c46b511..3e40e3fc7b3729fde2fdab4847a0c56b54e08cbf 100644 (file)
@@ -352,16 +352,20 @@ static int mount_add_device_links(Mount *m) {
         if (!p->what)
                 return 0;
 
-        if (!mount_is_bind(p) &&
-            !path_equal(m->where, "/")) {
-                r = unit_add_node_link(UNIT(m), p->what, false);
-                if (r < 0)
-                        return r;
-        }
+        if (mount_is_bind(p))
+                return 0;
+
+        if (!is_device_path(p->what))
+                return 0;
+
+        if (path_equal(m->where, "/"))
+                return 0;
+
+        r = unit_add_node_link(UNIT(m), p->what, false);
+        if (r < 0)
+                return r;
 
         if (p->passno > 0 &&
-            !mount_is_bind(p) &&
-            !path_equal(m->where, "/") &&
             UNIT(m)->manager->running_as == SYSTEMD_SYSTEM) {
                 char *name;
                 Unit *fsck;
@@ -960,7 +964,7 @@ static void mount_enter_mounting(Mount *m) {
         mkdir_p_label(m->where, m->directory_mode);
 
         if (dir_is_empty(m->where) <= 0)
-                log_notice("%s: Directory %s to mount over is not empty, ignoring. (To see the over-mounted files, please manually mount the underlying file system to a secondary location.)", m->meta.id, m->where);
+                log_notice("%s: Directory %s to mount over is not empty, mounting anyway. (To see the over-mounted files, please manually mount the underlying file system to a secondary location.)", m->meta.id, m->where);
 
         /* Create the source directory for bind-mounts if needed */
         p = get_mount_parameters_fragment(m);