]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: never create device depencies for /dev/root mounts
authorLennart Poettering <lennart@poettering.net>
Wed, 13 May 2015 12:40:37 +0000 (14:40 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 13 May 2015 12:40:37 +0000 (14:40 +0200)
http://lists.freedesktop.org/archives/systemd-devel/2015-May/031658.html

src/core/mount.c

index e143f6b6d8abb6a21056468a4275f23c700cfeb5..8853311bd71ddf6ddc90216deb5a9c80ad052601 100644 (file)
@@ -317,6 +317,12 @@ static int mount_add_device_links(Mount *m) {
         if (!is_device_path(p->what))
                 return 0;
 
+        /* /dev/root is a really weird thing, it's not a real device,
+         * but just a path the kernel exports for the root file system
+         * specified on the kernel command line. Ignore it here. */
+        if (path_equal(p->what, "/dev/root"))
+                return 0;
+
         if (path_equal(m->where, "/"))
                 return 0;