install: refactor find_symlinks() and don't search for symlinks recursively
authorMichal Sekletar <msekleta@redhat.com>
Tue, 9 Mar 2021 16:22:32 +0000 (17:22 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 12 Mar 2021 16:35:57 +0000 (17:35 +0100)
commitebf267d6b963188b5c972ee9c2814003c9f79e08
treeb8dfb7237e90ae019a2564a84c4b1688b8eb9ca5
parent6c9b5a50c97285b1a345481de98d6932ae503e9e
install: refactor find_symlinks() and don't search for symlinks recursively

After all we are only interested in symlinks either in top-level config
directory or in .wants and .requires sub-directories.

As a bonus this should speed up ListUnitFiles() roughly 3-4x on systems
with a lot of units that use drop-ins (e.g. SSH jump hosts with a lot of
user session scopes).

(cherry picked from commit 43b4e3058c106e663bbd5413e7bd106e55d6fd79)
src/shared/install.c