From: Daan De Meyer Date: Wed, 21 May 2025 14:35:00 +0000 (+0200) Subject: bootctl: Clean up includes X-Git-Tag: v258-rc1~537 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f712008289a14814b2a7bae9a836576b126ebfd9;p=thirdparty%2Fsystemd.git bootctl: Clean up includes Split out of #37344. --- diff --git a/src/bootctl/bootctl-install.c b/src/bootctl/bootctl-install.c index 7b083c4ad9d..c1a08b60490 100644 --- a/src/bootctl/bootctl-install.c +++ b/src/bootctl/bootctl-install.c @@ -1,6 +1,10 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ +#include +#include + #include "alloc-util.h" +#include "boot-entry.h" #include "bootctl.h" #include "bootctl-install.h" #include "bootctl-random-seed.h" @@ -10,7 +14,9 @@ #include "dirent-util.h" #include "efi-api.h" #include "efi-fundamental.h" +#include "efivars.h" #include "env-file.h" +#include "env-util.h" #include "fd-util.h" #include "fileio.h" #include "fs-util.h" @@ -18,12 +24,16 @@ #include "id128-util.h" #include "io-util.h" #include "kernel-config.h" -#include "os-util.h" +#include "log.h" +#include "openssl-util.h" #include "parse-argument.h" #include "path-util.h" #include "rm-rf.h" #include "stat-util.h" +#include "string-util.h" +#include "strv.h" #include "sync-util.h" +#include "time-util.h" #include "tmpfile-util.h" #include "umask-util.h" #include "utf8.h" diff --git a/src/bootctl/bootctl-random-seed.c b/src/bootctl/bootctl-random-seed.c index 0336cb3153f..4d0e50d6004 100644 --- a/src/bootctl/bootctl-random-seed.c +++ b/src/bootctl/bootctl-random-seed.c @@ -1,18 +1,18 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ +#include + #include "alloc-util.h" #include "bootctl.h" #include "bootctl-random-seed.h" -#include "bootctl-util.h" -#include "efi-api.h" +#include "efivars.h" #include "env-util.h" #include "fd-util.h" #include "find-esp.h" #include "fs-util.h" #include "glyph-util.h" #include "io-util.h" -#include "mkdir.h" -#include "path-util.h" +#include "log.h" #include "random-util.h" #include "sha256.h" #include "tmpfile-util.h" diff --git a/src/bootctl/bootctl-reboot-to-firmware.c b/src/bootctl/bootctl-reboot-to-firmware.c index 5387b4543e8..832626fe617 100644 --- a/src/bootctl/bootctl-reboot-to-firmware.c +++ b/src/bootctl/bootctl-reboot-to-firmware.c @@ -1,5 +1,10 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ +#include + +#include "sd-json.h" +#include "sd-varlink.h" + #include "bootctl-reboot-to-firmware.h" #include "efi-api.h" #include "errno-util.h" diff --git a/src/bootctl/bootctl-reboot-to-firmware.h b/src/bootctl/bootctl-reboot-to-firmware.h index e9cf9bf3a65..82f77b997d1 100644 --- a/src/bootctl/bootctl-reboot-to-firmware.h +++ b/src/bootctl/bootctl-reboot-to-firmware.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ -#include "sd-varlink.h" +#include "forward.h" int verb_reboot_to_firmware(int argc, char *argv[], void *userdata); diff --git a/src/bootctl/bootctl-set-efivar.c b/src/bootctl/bootctl-set-efivar.c index ead81ff3e04..c989f73aee4 100644 --- a/src/bootctl/bootctl-set-efivar.c +++ b/src/bootctl/bootctl-set-efivar.c @@ -8,7 +8,9 @@ #include "bootctl-set-efivar.h" #include "efi-loader.h" #include "efivars.h" +#include "log.h" #include "stdio-util.h" +#include "time-util.h" #include "utf8.h" #include "virt.h" diff --git a/src/bootctl/bootctl-status.c b/src/bootctl/bootctl-status.c index da1f23d5f89..352ab48ce70 100644 --- a/src/bootctl/bootctl-status.c +++ b/src/bootctl/bootctl-status.c @@ -1,9 +1,10 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ #include -#include #include +#include "sd-varlink.h" + #include "alloc-util.h" #include "bootctl.h" #include "bootctl-status.h" @@ -14,14 +15,17 @@ #include "dirent-util.h" #include "efi-api.h" #include "efi-loader.h" +#include "efivars.h" #include "errno-util.h" #include "fd-util.h" -#include "fileio.h" -#include "find-esp.h" +#include "hashmap.h" +#include "log.h" +#include "pager.h" #include "path-util.h" #include "pretty-print.h" #include "recurse-dir.h" -#include "terminal-util.h" +#include "string-util.h" +#include "strv.h" #include "tpm2-util.h" static int boot_config_load_and_select( diff --git a/src/bootctl/bootctl-status.h b/src/bootctl/bootctl-status.h index 44542f4dbd6..b26a2b1f6f4 100644 --- a/src/bootctl/bootctl-status.h +++ b/src/bootctl/bootctl-status.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ -#include "sd-varlink.h" +#include "forward.h" int verb_status(int argc, char *argv[], void *userdata); int verb_list(int argc, char *argv[], void *userdata); diff --git a/src/bootctl/bootctl-uki.c b/src/bootctl/bootctl-uki.c index 8808c30569a..2f71ccd36e1 100644 --- a/src/bootctl/bootctl-uki.c +++ b/src/bootctl/bootctl-uki.c @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ -#include +#include #include "alloc-util.h" #include "bootctl-uki.h" diff --git a/src/bootctl/bootctl-uki.h b/src/bootctl/bootctl-uki.h index effb984d805..20c080cf854 100644 --- a/src/bootctl/bootctl-uki.h +++ b/src/bootctl/bootctl-uki.h @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ +#include "forward.h" + int verb_kernel_identify(int argc, char *argv[], void *userdata); int verb_kernel_inspect(int argc, char *argv[], void *userdata); diff --git a/src/bootctl/bootctl-util.c b/src/bootctl/bootctl-util.c index 41eadbdf1b5..381c6f8af65 100644 --- a/src/bootctl/bootctl-util.c +++ b/src/bootctl/bootctl-util.c @@ -1,13 +1,17 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ +#include #include #include "alloc-util.h" +#include "boot-entry.h" #include "bootctl.h" #include "bootctl-util.h" #include "errno-util.h" #include "fileio.h" +#include "log.h" #include "stat-util.h" +#include "string-util.h" #include "sync-util.h" int sync_everything(void) { diff --git a/src/bootctl/bootctl.c b/src/bootctl/bootctl.c index 790ab2b653d..36744bece1d 100644 --- a/src/bootctl/bootctl.c +++ b/src/bootctl/bootctl.c @@ -5,6 +5,7 @@ #include "sd-varlink.h" #include "blockdev-util.h" +#include "boot-entry.h" #include "bootctl.h" #include "bootctl-install.h" #include "bootctl-random-seed.h" @@ -16,19 +17,25 @@ #include "devnum-util.h" #include "dissect-image.h" #include "efi-loader.h" +#include "efivars.h" #include "escape.h" #include "find-esp.h" +#include "image-policy.h" +#include "log.h" +#include "loop-util.h" #include "main-func.h" #include "mount-util.h" +#include "openssl-util.h" #include "pager.h" #include "parse-argument.h" #include "path-util.h" #include "pretty-print.h" +#include "string-util.h" +#include "strv.h" #include "utf8.h" #include "varlink-io.systemd.BootControl.h" #include "varlink-util.h" #include "verbs.h" -#include "virt.h" /* EFI_BOOT_OPTION_DESCRIPTION_MAX sets the maximum length for the boot option description * stored in NVRAM. The UEFI spec does not specify a minimum or maximum length for this diff --git a/src/bootctl/bootctl.h b/src/bootctl/bootctl.h index 191a970cd7e..8d064f5de24 100644 --- a/src/bootctl/bootctl.h +++ b/src/bootctl/bootctl.h @@ -1,13 +1,7 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once -#include "sd-id128.h" -#include "sd-json.h" - -#include "boot-entry.h" -#include "image-policy.h" -#include "openssl-util.h" -#include "pager.h" +#include "forward.h" typedef enum InstallSource { ARG_INSTALL_SOURCE_IMAGE,