analyze: skip to check ExecCommand for .mount and .swap units

They are not set by a unit file, but dynamically generated.

Fixes a bug caused by abf0ccc1c6.

Fixes #31396.
This commit is contained in:
Yu Watanabe
2024-02-20 11:59:10 +00:00
committed by Luca Boccassi
parent 793166aea5
commit 142f0e9517
-8
View File
@@ -201,10 +201,6 @@ static int verify_executables(Unit *u, const char *root) {
assert(u);
if (u->type == UNIT_MOUNT)
FOREACH_ARRAY(i, MOUNT(u)->exec_command, ELEMENTSOF(MOUNT(u)->exec_command))
RET_GATHER(r, verify_executable(u, i, root));
if (u->type == UNIT_SERVICE)
FOREACH_ARRAY(i, SERVICE(u)->exec_command, ELEMENTSOF(SERVICE(u)->exec_command))
LIST_FOREACH(command, j, *i)
@@ -215,10 +211,6 @@ static int verify_executables(Unit *u, const char *root) {
LIST_FOREACH(command, j, *i)
RET_GATHER(r, verify_executable(u, j, root));
if (u->type == UNIT_SWAP)
FOREACH_ARRAY(i, SWAP(u)->exec_command, ELEMENTSOF(SWAP(u)->exec_command))
RET_GATHER(r, verify_executable(u, i, root));
return r;
}