]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
analyze: skip to check ExecCommand for .mount and .swap units
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 20 Feb 2024 02:09:43 +0000 (11:09 +0900)
committerLuca Boccassi <luca.boccassi@gmail.com>
Tue, 20 Feb 2024 11:59:10 +0000 (11:59 +0000)
They are not set by a unit file, but dynamically generated.

Fixes a bug caused by abf0ccc1c6fb81fdcb801566695600a518a28b43.

Fixes #31396.

src/analyze/analyze-verify-util.c

index bc61ebe2b17c6f266bc57f54c24652851ace430c..3e5adcab2ef0ad62b768cae65b53d0fb67e244a3 100644 (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;
 }