mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-03-13 12:58:20 +03:00
mount: simplify device node conditions a bit
This commit is contained in:
parent
63a8b2f947
commit
dd144c63e2
@ -352,18 +352,20 @@ static int mount_add_device_links(Mount *m) {
|
||||
if (!p->what)
|
||||
return 0;
|
||||
|
||||
if (!mount_is_bind(p) &&
|
||||
!path_equal(m->where, "/") &&
|
||||
is_device_path(p->what)) {
|
||||
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, "/") &&
|
||||
is_device_path(p->what) &&
|
||||
UNIT(m)->manager->running_as == SYSTEMD_SYSTEM) {
|
||||
char *name;
|
||||
Unit *fsck;
|
||||
|
Loading…
x
Reference in New Issue
Block a user