From: Daan De Meyer Date: Wed, 14 May 2025 15:12:06 +0000 (+0200) Subject: vmspawn: Clean up includes X-Git-Tag: v258-rc1~617^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F37438%2Fhead;p=thirdparty%2Fsystemd.git vmspawn: Clean up includes Split out of #37344 --- diff --git a/src/vmspawn/test-vmspawn-util.c b/src/vmspawn/test-vmspawn-util.c index aaf55245364..d487cbcacb7 100644 --- a/src/vmspawn/test-vmspawn-util.c +++ b/src/vmspawn/test-vmspawn-util.c @@ -1,7 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ -#include - #include "alloc-util.h" #include "string-util.h" #include "tests.h" diff --git a/src/vmspawn/vmspawn-mount.c b/src/vmspawn/vmspawn-mount.c index a57baaa3e8a..9f03a216554 100644 --- a/src/vmspawn/vmspawn-mount.c +++ b/src/vmspawn/vmspawn-mount.c @@ -2,8 +2,6 @@ #include "alloc-util.h" #include "extract-word.h" -#include "macro.h" -#include "parse-argument.h" #include "path-util.h" #include "stat-util.h" #include "string-util.h" diff --git a/src/vmspawn/vmspawn-mount.h b/src/vmspawn/vmspawn-mount.h index 2ea24fd0354..531288a9edd 100644 --- a/src/vmspawn/vmspawn-mount.h +++ b/src/vmspawn/vmspawn-mount.h @@ -1,8 +1,7 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once -#include -#include +#include "forward.h" typedef struct RuntimeMount { bool read_only; diff --git a/src/vmspawn/vmspawn-register.c b/src/vmspawn/vmspawn-register.c index a55caebc119..ae7edd0fdbf 100644 --- a/src/vmspawn/vmspawn-register.c +++ b/src/vmspawn/vmspawn-register.c @@ -9,9 +9,8 @@ #include "bus-error.h" #include "bus-locator.h" -#include "json-util.h" +#include "errno-util.h" #include "log.h" -#include "macro.h" #include "process-util.h" #include "socket-util.h" #include "string-util.h" diff --git a/src/vmspawn/vmspawn-register.h b/src/vmspawn/vmspawn-register.h index c785b162ba5..58cae542ceb 100644 --- a/src/vmspawn/vmspawn-register.h +++ b/src/vmspawn/vmspawn-register.h @@ -1,9 +1,6 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ -#include - -#include "sd-bus.h" -#include "sd-id128.h" +#include "forward.h" int register_machine( sd_bus *bus, diff --git a/src/vmspawn/vmspawn-scope.c b/src/vmspawn/vmspawn-scope.c index 024efb53e1b..624bd7730d5 100644 --- a/src/vmspawn/vmspawn-scope.c +++ b/src/vmspawn/vmspawn-scope.c @@ -1,7 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ -#include - #include "sd-bus.h" #include "bus-error.h" @@ -11,13 +9,11 @@ #include "bus-wait-for-jobs.h" #include "escape.h" #include "log.h" -#include "macro.h" -#include "process-util.h" +#include "pidref.h" #include "random-util.h" #include "socket-util.h" +#include "string-util.h" #include "strv.h" -#include "unit-def.h" -#include "unit-name.h" #include "vmspawn-scope.h" int start_transient_scope(sd_bus *bus, const char *machine_name, bool allow_pidfd, char **ret_scope) { diff --git a/src/vmspawn/vmspawn-scope.h b/src/vmspawn/vmspawn-scope.h index 100de94fa13..c29325a3145 100644 --- a/src/vmspawn/vmspawn-scope.h +++ b/src/vmspawn/vmspawn-scope.h @@ -1,11 +1,7 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once -#include - -#include "sd-bus.h" - -#include "macro.h" +#include "forward.h" typedef struct SocketServicePair { char **exec_start_pre; diff --git a/src/vmspawn/vmspawn-settings.h b/src/vmspawn/vmspawn-settings.h index 0902dbb245b..1267dd07018 100644 --- a/src/vmspawn/vmspawn-settings.h +++ b/src/vmspawn/vmspawn-settings.h @@ -1,10 +1,7 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once -#include -#include - -#include "macro.h" +#include "forward.h" typedef enum ConsoleMode { CONSOLE_INTERACTIVE, /* ptyfwd */ diff --git a/src/vmspawn/vmspawn-util.c b/src/vmspawn/vmspawn-util.c index 3fb8f8405b3..1216f3c5be0 100644 --- a/src/vmspawn/vmspawn-util.c +++ b/src/vmspawn/vmspawn-util.c @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ #include +#include #include #include @@ -10,20 +11,14 @@ #include "architecture.h" #include "conf-files.h" #include "errno-util.h" -#include "escape.h" #include "fd-util.h" -#include "fileio.h" +#include "hashmap.h" #include "json-util.h" #include "log.h" -#include "macro.h" -#include "memory-util.h" #include "path-lookup.h" #include "path-util.h" #include "random-util.h" -#include "recurse-dir.h" #include "siphash24.h" -#include "socket-util.h" -#include "sort-util.h" #include "string-table.h" #include "string-util.h" #include "strv.h" diff --git a/src/vmspawn/vmspawn-util.h b/src/vmspawn/vmspawn-util.h index ff1cffd13e1..a8a69a9e50f 100644 --- a/src/vmspawn/vmspawn-util.h +++ b/src/vmspawn/vmspawn-util.h @@ -1,10 +1,7 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once -#include - -#include "assert-util.h" -#include "memory-util.h" +#include "forward.h" #if defined(__x86_64__) || defined(__i386__) || defined(__arm__) || defined(__aarch64__) # define ARCHITECTURE_SUPPORTS_SMBIOS 1 diff --git a/src/vmspawn/vmspawn.c b/src/vmspawn/vmspawn.c index 7c12b5e6120..3f53f1f436a 100644 --- a/src/vmspawn/vmspawn.c +++ b/src/vmspawn/vmspawn.c @@ -3,13 +3,13 @@ #include #include #include -#include #include #include #include #include #include +#include "sd-bus.h" #include "sd-daemon.h" #include "sd-event.h" #include "sd-id128.h" @@ -18,16 +18,14 @@ #include "architecture.h" #include "bootspec.h" #include "build.h" +#include "bus-error.h" #include "bus-internal.h" #include "bus-locator.h" #include "bus-util.h" #include "bus-wait-for-jobs.h" #include "capability-util.h" -#include "chase.h" #include "common-signal.h" #include "copy.h" -#include "creds-util.h" -#include "dirent-util.h" #include "discover-image.h" #include "dissect-image.h" #include "escape.h" @@ -35,18 +33,15 @@ #include "event-util.h" #include "extract-word.h" #include "fd-util.h" -#include "fileio.h" #include "format-util.h" #include "fs-util.h" #include "gpt.h" #include "hexdecoct.h" #include "hostname-setup.h" #include "hostname-util.h" -#include "io-util.h" -#include "kernel-image.h" +#include "id128-util.h" #include "log.h" #include "machine-credential.h" -#include "macro.h" #include "main-func.h" #include "mkdir.h" #include "namespace-util.h" @@ -66,15 +61,13 @@ #include "rm-rf.h" #include "signal-util.h" #include "socket-util.h" -#include "stat-util.h" #include "stdio-util.h" #include "string-util.h" #include "strv.h" #include "sync-util.h" -#include "time-util.h" +#include "terminal-util.h" #include "tmpfile-util.h" #include "unit-name.h" -#include "user-util.h" #include "utf8.h" #include "vmspawn-mount.h" #include "vmspawn-register.h"