diff options
author | Lennart Poettering <lennart@poettering.net> | 2022-02-21 13:47:38 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2022-02-21 17:22:23 +0100 |
commit | 36258fbe74977642258667b1b611c8b95265cf1f (patch) | |
tree | f731383333462757f020fba14570be16e25483c0 /src/analyze/analyze-unit-paths.c | |
parent | analyze: split out log control verb (diff) | |
download | systemd-36258fbe74977642258667b1b611c8b95265cf1f.tar.xz systemd-36258fbe74977642258667b1b611c8b95265cf1f.zip |
analyze: split out "unit-paths" verb
Diffstat (limited to 'src/analyze/analyze-unit-paths.c')
-rw-r--r-- | src/analyze/analyze-unit-paths.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/analyze/analyze-unit-paths.c b/src/analyze/analyze-unit-paths.c new file mode 100644 index 0000000000..f18a10ef34 --- /dev/null +++ b/src/analyze/analyze-unit-paths.c @@ -0,0 +1,21 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ + +#include "analyze.h" +#include "analyze-unit-paths.h" +#include "path-lookup.h" +#include "strv.h" + +int dump_unit_paths(int argc, char *argv[], void *userdata) { + _cleanup_(lookup_paths_free) LookupPaths paths = {}; + int r; + char **p; + + r = lookup_paths_init(&paths, arg_scope, 0, NULL); + if (r < 0) + return log_error_errno(r, "lookup_paths_init() failed: %m"); + + STRV_FOREACH(p, paths.search_path) + puts(*p); + + return 0; +} |