diff options
author | Lennart Poettering <lennart@poettering.net> | 2022-02-21 14:39:16 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2022-02-21 17:22:23 +0100 |
commit | f2562398ea50c18decab166dfab61b4d09373eaf (patch) | |
tree | 71f14fbd5d8f62f1182192c5b08b5732b55f3a26 /src/analyze/analyze-verify-util.h | |
parent | analyze: move inspect-elf verb entrypoint into analyze-elf.[ch], too (diff) | |
download | systemd-f2562398ea50c18decab166dfab61b4d09373eaf.tar.xz systemd-f2562398ea50c18decab166dfab61b4d09373eaf.zip |
analyze: split out "verify" verb into own .c/.h file
This renames the old analyze-verify.[ch] pair →
analyze-verify-util.[ch], because it's used by the test logic as well,
and by keeping it separate from the verify verb logic we don't have to
import the arg_xyz variables.
Diffstat (limited to 'src/analyze/analyze-verify-util.h')
-rw-r--r-- | src/analyze/analyze-verify-util.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/analyze/analyze-verify-util.h b/src/analyze/analyze-verify-util.h new file mode 100644 index 0000000000..47b78a8158 --- /dev/null +++ b/src/analyze/analyze-verify-util.h @@ -0,0 +1,23 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +#pragma once + +#include <stdbool.h> + +#include "execute.h" +#include "path-lookup.h" + +typedef enum RecursiveErrors { + RECURSIVE_ERRORS_YES, /* Look for errors in all associated units */ + RECURSIVE_ERRORS_NO, /* Don't look for errors in any but the selected unit */ + RECURSIVE_ERRORS_ONE, /* Look for errors in the selected unit and its direct dependencies */ + _RECURSIVE_ERRORS_MAX, + _RECURSIVE_ERRORS_INVALID = -EINVAL, +} RecursiveErrors; + +int verify_generate_path(char **var, char **filenames); +int verify_prepare_filename(const char *filename, char **ret); +int verify_executable(Unit *u, const ExecCommand *exec, const char *root); +int verify_units(char **filenames, UnitFileScope scope, bool check_man, bool run_generators, RecursiveErrors recursive_errors, const char *root); + +const char* recursive_errors_to_string(RecursiveErrors i) _const_; +RecursiveErrors recursive_errors_from_string(const char *s) _pure_; |