Split out of #37344.
#include "analyze.h"
#include "analyze-architectures.h"
+#include "ansi-color.h"
+#include "architecture.h"
#include "format-table.h"
+#include "log.h"
+#include "string-util.h"
+#include "strv.h"
static int add_arch(Table *t, Architecture a) {
const char *c, *color;
/* SPDX-License-Identifier: LGPL-2.1-or-later */
+#include "sd-bus.h"
+
#include "analyze.h"
#include "analyze-blame.h"
#include "analyze-time-data.h"
+#include "bus-util.h"
#include "format-table.h"
+#include "runtime-scope.h"
int verb_blame(int argc, char *argv[], void *userdata) {
_cleanup_(sd_bus_flush_close_unrefp) sd_bus *bus = NULL;
if (r < 0)
return r;
- return EXIT_SUCCESS;
+ return 0;
}
#include "alloc-util.h"
#include "analyze.h"
#include "analyze-calendar.h"
+#include "ansi-color.h"
#include "calendarspec.h"
+#include "errno-util.h"
#include "format-table.h"
-#include "terminal-util.h"
+#include "log.h"
+#include "string-util.h"
+#include "strv.h"
+#include "time-util.h"
static int test_calendar_one(usec_t n, const char *p) {
_cleanup_(calendar_spec_freep) CalendarSpec *spec = NULL;
#include "cap-list.h"
#include "capability-util.h"
#include "format-table.h"
+#include "log.h"
#include "parse-util.h"
static int table_add_capability(Table *table, int c) {
if (r < 0)
return log_error_errno(r, "Failed to output table: %m");
- return EXIT_SUCCESS;
+ return 0;
}
#include "analyze.h"
#include "analyze-cat-config.h"
-#include "conf-files.h"
#include "constants.h"
+#include "log.h"
+#include "pager.h"
#include "path-util.h"
#include "pretty-print.h"
#include "strv.h"
return r;
}
- return EXIT_SUCCESS;
+ return 0;
}
#include "alloc-util.h"
#include "analyze.h"
#include "analyze-chid.h"
+#include "ansi-color.h"
#include "chid-fundamental.h"
#include "device-util.h"
-#include "dirent-util.h"
#include "edid-fundamental.h"
#include "efi-api.h"
+#include "errno-util.h"
#include "escape.h"
#include "fd-util.h"
#include "fileio.h"
#include "format-table.h"
+#include "glyph-util.h"
#include "parse-util.h"
+#include "string-util.h"
#include "strv.h"
#include "utf8.h"
#include "virt.h"
#include "analyze-compare-versions.h"
#include "compare-operator.h"
#include "log.h"
-#include "macro.h"
#include "string-util.h"
-#include "strv.h"
int verb_compare_versions(int argc, char *argv[], void *userdata) {
const char *v1 = ASSERT_PTR(argv[1]), *v2 = ASSERT_PTR(argv[argc-1]);
#include "analyze-condition.h"
#include "analyze-verify-util.h"
#include "condition.h"
-#include "conf-parser.h"
#include "load-fragment.h"
+#include "manager.h"
#include "service.h"
+#include "string-util.h"
+#include "strv.h"
static int parse_condition(Unit *u, const char *line) {
assert(u);
/* SPDX-License-Identifier: LGPL-2.1-or-later */
+#include "sd-bus.h"
+
#include "alloc-util.h"
#include "analyze.h"
#include "analyze-critical-chain.h"
#include "analyze-time-data.h"
+#include "ansi-color.h"
#include "bus-error.h"
-#include "copy.h"
-#include "path-util.h"
+#include "bus-util.h"
+#include "glyph-util.h"
+#include "hashmap.h"
+#include "log.h"
+#include "pager.h"
+#include "runtime-scope.h"
#include "sort-util.h"
#include "special.h"
#include "static-destruct.h"
#include "strv.h"
-#include "terminal-util.h"
+#include "time-util.h"
static Hashmap *unit_times_hashmap = NULL;
STATIC_DESTRUCTOR_REGISTER(unit_times_hashmap, hashmap_freep);
/* SPDX-License-Identifier: LGPL-2.1-or-later */
+#include "sd-bus.h"
+
#include "alloc-util.h"
#include "analyze.h"
#include "analyze-dot.h"
#include "bus-error.h"
#include "bus-locator.h"
#include "bus-unit-util.h"
+#include "bus-util.h"
#include "glob-util.h"
+#include "log.h"
+#include "runtime-scope.h"
+#include "string-util.h"
+#include "strv.h"
#include "terminal-util.h"
static int graph_one_property(
#include "bus-locator.h"
#include "bus-message-util.h"
#include "bus-util.h"
+#include "pager.h"
+#include "runtime-scope.h"
+#include "strv.h"
+#include "unit-name.h"
static int dump_string(sd_bus *bus) {
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
#include "analyze-exit-status.h"
#include "exit-status.h"
#include "format-table.h"
+#include "log.h"
+#include "strv.h"
int verb_exit_status(int argc, char *argv[], void *userdata) {
_cleanup_(table_unrefp) Table *table = NULL;
if (r < 0)
return log_error_errno(r, "Failed to output table: %m");
- return EXIT_SUCCESS;
+ return 0;
}
/* SPDX-License-Identifier: LGPL-2.1-or-later */
+#include <sys/sysmacros.h>
+
+#include "sd-bus.h"
+
#include "alloc-util.h"
#include "analyze.h"
#include "analyze-fdstore.h"
#include "bus-error.h"
#include "bus-locator.h"
+#include "bus-util.h"
#include "fd-util.h"
#include "format-table.h"
+#include "runtime-scope.h"
+#include "strv.h"
+#include "unit-name.h"
static int dump_fdstore(sd_bus *bus, const char *arg) {
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
/* SPDX-License-Identifier: LGPL-2.1-or-later */
-#include "sd-bus.h"
-
int verb_fdstore(int argc, char *argv[], void *userdata);
/* SPDX-License-Identifier: LGPL-2.1-or-later */
+#include <stdio.h>
+
#include "alloc-util.h"
#include "analyze.h"
#include "analyze-filesystems.h"
+#include "ansi-color.h"
#include "fileio.h"
#include "filesystems.h"
+#include "log.h"
+#include "nulstr-util.h"
+#include "pager.h"
#include "set.h"
+#include "string-util.h"
#include "strv.h"
-#include "terminal-util.h"
static int load_available_kernel_filesystems(Set **ret) {
_cleanup_set_free_ Set *filesystems = NULL;
#include "alloc-util.h"
#include "analyze.h"
#include "analyze-image-policy.h"
+#include "ansi-color.h"
#include "format-table.h"
#include "image-policy.h"
-#include "terminal-util.h"
+#include "string-util.h"
static int table_add_designator_line(Table *table, PartitionDesignator d, PartitionPolicyFlags f) {
_cleanup_free_ char *q = NULL;
#include "analyze-inspect-elf.h"
#include "chase.h"
#include "elf-util.h"
-#include "errno-util.h"
#include "fd-util.h"
#include "format-table.h"
-#include "format-util.h"
#include "json-util.h"
-#include "path-util.h"
+#include "string-util.h"
#include "strv.h"
static int analyze_elf(char **filenames, sd_json_format_flags_t json_flags) {
/* SPDX-License-Identifier: LGPL-2.1-or-later */
+#include "sd-bus.h"
+
#include "analyze.h"
#include "analyze-log-control.h"
+#include "bus-util.h"
+#include "runtime-scope.h"
#include "verb-log-control.h"
int verb_log_control(int argc, char *argv[], void *userdata) {
if (r < 0)
return r;
- return EXIT_SUCCESS;
+ return 0;
}
#include "bus-error.h"
#include "bus-internal.h"
#include "bus-message-util.h"
+#include "bus-util.h"
+#include "log.h"
+#include "pager.h"
+#include "strv.h"
static int dump_malloc_info(sd_bus *bus, char *service) {
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
return r;
}
- return EXIT_SUCCESS;
+ return 0;
}
/* SPDX-License-Identifier: LGPL-2.1-or-later */
+#include <unistd.h>
+
#include "alloc-util.h"
#include "analyze.h"
#include "analyze-pcrs.h"
+#include "ansi-color.h"
#include "fileio.h"
#include "format-table.h"
#include "hexdecoct.h"
-#include "terminal-util.h"
+#include "log.h"
+#include "strv.h"
#include "tpm2-util.h"
static int get_pcr_alg(const char **ret) {
/* SPDX-License-Identifier: LGPL-2.1-or-later */
+#include "sd-bus.h"
+
#include "alloc-util.h"
#include "analyze.h"
#include "analyze-plot.h"
#include "analyze-time-data.h"
#include "bus-error.h"
#include "bus-map-properties.h"
+#include "bus-util.h"
#include "format-table.h"
#include "os-util.h"
+#include "runtime-scope.h"
#include "sort-util.h"
+#include "string-util.h"
#include "strv.h"
+#include "time-util.h"
#include "unit-def.h"
#include "version.h"
/* SPDX-License-Identifier: LGPL-2.1-or-later */
-#include <sys/utsname.h>
+#include <linux/capability.h>
-#include "af-list.h"
+#include "sd-bus.h"
+
+#include "analyze-verify-util.h"
#include "analyze.h"
#include "analyze-security.h"
-#include "analyze-verify.h"
#include "bus-error.h"
#include "bus-locator.h"
#include "bus-map-properties.h"
#include "fileio.h"
#include "format-table.h"
#include "in-addr-prefix-util.h"
-#include "locale-util.h"
-#include "macro.h"
#include "manager.h"
#include "missing_sched.h"
#include "mkdir.h"
#include "set.h"
#include "stdio-util.h"
#include "strv.h"
-#include "terminal-util.h"
#include "unit-def.h"
#include "unit-name.h"
#include "unit-serialize.h"
/* SPDX-License-Identifier: LGPL-2.1-or-later */
+#include "sd-bus.h"
+
#include "analyze.h"
#include "analyze-service-watchdogs.h"
#include "bus-error.h"
#include "bus-locator.h"
+#include "bus-util.h"
#include "parse-util.h"
+#include "runtime-scope.h"
+#include "string-util.h"
int verb_service_watchdogs(int argc, char *argv[], void *userdata) {
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
/* SPDX-License-Identifier: LGPL-2.1-or-later */
+#include <stdio.h>
+
#include "alloc-util.h"
#include "analyze.h"
#include "analyze-smbios11.h"
#include "escape.h"
+#include "glyph-util.h"
+#include "log.h"
#include "smbios11.h"
-#include "virt.h"
int verb_smbios11(int argc, char *argv[], void *userdata) {
unsigned n = 0;
/* SPDX-License-Identifier: LGPL-2.1-or-later */
+#include <stdio.h>
+#include <unistd.h>
+
#include "alloc-util.h"
-#include "analyze.h"
#include "analyze-srk.h"
#include "fileio.h"
+#include "log.h"
+#include "terminal-util.h"
#include "tpm2-util.h"
int verb_srk(int argc, char *argv[], void *userdata) {
#include "alloc-util.h"
#include "analyze.h"
#include "analyze-syscall-filter.h"
+#include "ansi-color.h"
#include "fd-util.h"
#include "fileio.h"
+#include "log.h"
#include "nulstr-util.h"
+#include "pager.h"
#include "seccomp-util.h"
#include "set.h"
#include "strv.h"
-#include "terminal-util.h"
#if HAVE_SECCOMP
/* SPDX-License-Identifier: LGPL-2.1-or-later */
+#include "sd-bus.h"
+
#include "alloc-util.h"
#include "analyze.h"
#include "analyze-time-data.h"
#include "bus-locator.h"
#include "bus-map-properties.h"
#include "bus-unit-util.h"
-#include "memory-util.h"
+#include "bus-util.h"
+#include "log.h"
+#include "runtime-scope.h"
#include "special.h"
+#include "string-util.h"
#include "strv.h"
+#include "time-util.h"
static void subtract_timestamp(usec_t *a, usec_t b) {
assert(a);
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
-#include "sd-bus.h"
-
-#include "memory-util.h"
-#include "time-util.h"
+#include "forward.h"
#include "unit-def.h"
typedef struct BootTimes {
/* SPDX-License-Identifier: LGPL-2.1-or-later */
+#include "sd-bus.h"
+
#include "alloc-util.h"
#include "analyze.h"
#include "analyze-time.h"
#include "analyze-time-data.h"
+#include "bus-util.h"
+#include "runtime-scope.h"
int verb_time(int argc, char *argv[], void *userdata) {
_cleanup_(sd_bus_flush_close_unrefp) sd_bus *bus = NULL;
#include "analyze.h"
#include "analyze-timespan.h"
-#include "calendarspec.h"
+#include "ansi-color.h"
#include "format-table.h"
#include "glyph-util.h"
+#include "log.h"
#include "strv.h"
-#include "terminal-util.h"
+#include "time-util.h"
int verb_timespan(int argc, char *argv[], void *userdata) {
STRV_FOREACH(input_timespan, strv_skip(argv, 1)) {
#include "analyze.h"
#include "analyze-timestamp.h"
+#include "ansi-color.h"
+#include "errno-util.h"
#include "format-table.h"
-#include "terminal-util.h"
+#include "log.h"
+#include "strv.h"
+#include "time-util.h"
static int test_timestamp_one(const char *p) {
_cleanup_(table_unrefp) Table *table = NULL;
/* SPDX-License-Identifier: LGPL-2.1-or-later */
+#include <stdio.h>
+
#include <fnmatch.h>
#include "alloc-util.h"
#include "analyze.h"
#include "analyze-unit-files.h"
+#include "hashmap.h"
+#include "log.h"
#include "path-lookup.h"
#include "strv.h"
+#include "unit-file.h"
static bool strv_fnmatch_strv_or_empty(char* const* patterns, char **strv, int flags) {
STRV_FOREACH(s, strv)
/* SPDX-License-Identifier: LGPL-2.1-or-later */
+#include <stdio.h>
+
#include "analyze.h"
#include "analyze-unit-paths.h"
#include "path-lookup.h"
STRV_FOREACH(p, paths.search_path)
puts(*p);
- return EXIT_SUCCESS;
+ return 0;
}
#include <stdlib.h>
+#include "sd-bus.h"
+
#include "all-units.h"
#include "alloc-util.h"
#include "analyze.h"
#include "analyze-verify-util.h"
#include "bus-error.h"
-#include "bus-util.h"
+#include "errno-util.h"
#include "log.h"
#include "manager.h"
#include "pager.h"
#include "path-util.h"
+#include "set.h"
#include "string-table.h"
+#include "string-util.h"
#include "strv.h"
#include "unit-name.h"
#include "unit-serialize.h"
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
-#include <stdbool.h>
+#include "forward.h"
-#include "execute.h"
-#include "path-lookup.h"
+typedef struct ExecCommand ExecCommand;
+typedef struct Unit Unit;
typedef enum RecursiveErrors {
RECURSIVE_ERRORS_YES, /* Look for errors in all associated units */
#include "alloc-util.h"
#include "analyze.h"
-#include "analyze-verify.h"
#include "analyze-verify-util.h"
+#include "analyze-verify.h"
#include "copy.h"
+#include "extract-word.h"
+#include "log.h"
+#include "path-util.h"
#include "rm-rf.h"
+#include "runtime-scope.h"
+#include "strv.h"
#include "tmpfile-util.h"
static int process_aliases(char *argv[], char *tempdir, char ***ret) {
***/
#include <getopt.h>
-#include <inttypes.h>
+#include <locale.h>
#include <stdio.h>
#include <stdlib.h>
-#include <unistd.h>
#include "sd-bus.h"
+#include "sd-json.h"
#include "alloc-util.h"
+#include "analyze-verify-util.h"
#include "analyze.h"
#include "analyze-architectures.h"
#include "analyze-blame.h"
#include "analyze-srk.h"
#include "analyze-syscall-filter.h"
#include "analyze-time.h"
-#include "analyze-time-data.h"
#include "analyze-timespan.h"
#include "analyze-timestamp.h"
#include "analyze-unit-files.h"
#include "analyze-verify.h"
#include "build.h"
#include "bus-error.h"
-#include "bus-locator.h"
-#include "bus-map-properties.h"
-#include "bus-unit-util.h"
+#include "bus-util.h"
#include "calendarspec.h"
-#include "cap-list.h"
-#include "capability-util.h"
-#include "conf-files.h"
-#include "constants.h"
-#include "copy.h"
-#include "exit-status.h"
-#include "extract-word.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "filesystems.h"
-#include "format-table.h"
-#include "glob-util.h"
-#include "hashmap.h"
+#include "dissect-image.h"
#include "image-policy.h"
-#include "locale-util.h"
#include "log.h"
+#include "loop-util.h"
#include "main-func.h"
#include "mount-util.h"
-#include "nulstr-util.h"
#include "pager.h"
#include "parse-argument.h"
#include "parse-util.h"
#include "path-util.h"
#include "pretty-print.h"
-#include "rm-rf.h"
-#if HAVE_SECCOMP
-# include "seccomp-util.h"
-#endif
-#include "sort-util.h"
-#include "special.h"
-#include "stat-util.h"
+#include "runtime-scope.h"
#include "string-table.h"
+#include "string-util.h"
#include "strv.h"
-#include "strxcpyx.h"
-#include "terminal-util.h"
#include "time-util.h"
#include "unit-name.h"
-#include "verb-log-control.h"
#include "verbs.h"
DotMode arg_dot = DEP_ALL;
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
-#include <stdbool.h>
+#include "forward.h"
-#include "sd-json.h"
-
-#include "analyze-verify-util.h"
-#include "bus-util.h"
-#include "pager.h"
-#include "pretty-print.h"
-#include "time-util.h"
-#include "unit-file.h"
+typedef enum RecursiveErrors RecursiveErrors;
typedef enum DotMode {
DEP_ALL,
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include "analyze-verify-util.h"
+#include "execute.h"
#include "tests.h"
const char *arg_instance = "test_instance";