From 142f0e951752d925b073c1c9ede52df617b45be9 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Tue, 20 Feb 2024 11:09:43 +0900 Subject: [PATCH] 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 abf0ccc1c6fb81fdcb801566695600a518a28b43. Fixes #31396. --- src/analyze/analyze-verify-util.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/analyze/analyze-verify-util.c b/src/analyze/analyze-verify-util.c index bc61ebe2b1..3e5adcab2e 100644 --- a/src/analyze/analyze-verify-util.c +++ b/src/analyze/analyze-verify-util.c @@ -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; }