1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-01 00:51:24 +03:00

core: never create device depencies for /dev/root mounts

http://lists.freedesktop.org/archives/systemd-devel/2015-May/031658.html
This commit is contained in:
Lennart Poettering 2015-05-13 14:40:37 +02:00
parent 5a8af538ae
commit 7ba2711d3f

View File

@ -317,6 +317,12 @@ static int mount_add_device_links(Mount *m) {
if (!is_device_path(p->what)) if (!is_device_path(p->what))
return 0; 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, "/")) if (path_equal(m->where, "/"))
return 0; return 0;