From 0b676aab33be2fa8b092f1bf5f1f4e04f072eda4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 7 Nov 2024 12:24:40 +0100 Subject: [PATCH] Move bootctl to its own source subdirectory It's been split into a bunch of files and deserves its own subdirectory similarly to systemctl. --- meson.build | 1 + src/boot/meson.build | 22 ---------------- src/{boot => bootctl}/bootctl-install.c | 0 src/{boot => bootctl}/bootctl-install.h | 0 src/{boot => bootctl}/bootctl-random-seed.c | 0 src/{boot => bootctl}/bootctl-random-seed.h | 0 .../bootctl-reboot-to-firmware.c | 0 .../bootctl-reboot-to-firmware.h | 0 src/{boot => bootctl}/bootctl-set-efivar.c | 0 src/{boot => bootctl}/bootctl-set-efivar.h | 0 src/{boot => bootctl}/bootctl-status.c | 0 src/{boot => bootctl}/bootctl-status.h | 0 .../bootctl-systemd-efi-options.c | 0 .../bootctl-systemd-efi-options.h | 0 src/{boot => bootctl}/bootctl-uki.c | 0 src/{boot => bootctl}/bootctl-uki.h | 0 src/{boot => bootctl}/bootctl-util.c | 0 src/{boot => bootctl}/bootctl-util.h | 0 src/{boot => bootctl}/bootctl.c | 0 src/{boot => bootctl}/bootctl.h | 0 src/bootctl/meson.build | 26 +++++++++++++++++++ 21 files changed, 27 insertions(+), 22 deletions(-) rename src/{boot => bootctl}/bootctl-install.c (100%) rename src/{boot => bootctl}/bootctl-install.h (100%) rename src/{boot => bootctl}/bootctl-random-seed.c (100%) rename src/{boot => bootctl}/bootctl-random-seed.h (100%) rename src/{boot => bootctl}/bootctl-reboot-to-firmware.c (100%) rename src/{boot => bootctl}/bootctl-reboot-to-firmware.h (100%) rename src/{boot => bootctl}/bootctl-set-efivar.c (100%) rename src/{boot => bootctl}/bootctl-set-efivar.h (100%) rename src/{boot => bootctl}/bootctl-status.c (100%) rename src/{boot => bootctl}/bootctl-status.h (100%) rename src/{boot => bootctl}/bootctl-systemd-efi-options.c (100%) rename src/{boot => bootctl}/bootctl-systemd-efi-options.h (100%) rename src/{boot => bootctl}/bootctl-uki.c (100%) rename src/{boot => bootctl}/bootctl-uki.h (100%) rename src/{boot => bootctl}/bootctl-util.c (100%) rename src/{boot => bootctl}/bootctl-util.h (100%) rename src/{boot => bootctl}/bootctl.c (100%) rename src/{boot => bootctl}/bootctl.h (100%) create mode 100644 src/bootctl/meson.build diff --git a/meson.build b/meson.build index f1339e065d1..2624bd363bd 100644 --- a/meson.build +++ b/meson.build @@ -2346,6 +2346,7 @@ subdir('src/battery-check') subdir('src/binfmt') subdir('src/boot') subdir('src/boot/efi') +subdir('src/bootctl') subdir('src/busctl') subdir('src/cgls') subdir('src/cgroups-agent') diff --git a/src/boot/meson.build b/src/boot/meson.build index a72388baff2..95e3c786fcd 100644 --- a/src/boot/meson.build +++ b/src/boot/meson.build @@ -1,17 +1,5 @@ # SPDX-License-Identifier: LGPL-2.1-or-later -bootctl_sources = files( - 'bootctl-install.c', - 'bootctl-random-seed.c', - 'bootctl-reboot-to-firmware.c', - 'bootctl-set-efivar.c', - 'bootctl-status.c', - 'bootctl-systemd-efi-options.c', - 'bootctl-uki.c', - 'bootctl-util.c', - 'bootctl.c', -) - if get_option('link-boot-shared') boot_link_with = [libshared] else @@ -22,16 +10,6 @@ else endif executables += [ - executable_template + { - 'name' : 'bootctl', - 'public' : true, - 'conditions' : [ - 'HAVE_BLKID', - ], - 'sources' : bootctl_sources, - 'link_with' : boot_link_with, - 'dependencies' : [libblkid, libopenssl], - }, libexec_template + { 'name' : 'systemd-bless-boot', 'public' : true, diff --git a/src/boot/bootctl-install.c b/src/bootctl/bootctl-install.c similarity index 100% rename from src/boot/bootctl-install.c rename to src/bootctl/bootctl-install.c diff --git a/src/boot/bootctl-install.h b/src/bootctl/bootctl-install.h similarity index 100% rename from src/boot/bootctl-install.h rename to src/bootctl/bootctl-install.h diff --git a/src/boot/bootctl-random-seed.c b/src/bootctl/bootctl-random-seed.c similarity index 100% rename from src/boot/bootctl-random-seed.c rename to src/bootctl/bootctl-random-seed.c diff --git a/src/boot/bootctl-random-seed.h b/src/bootctl/bootctl-random-seed.h similarity index 100% rename from src/boot/bootctl-random-seed.h rename to src/bootctl/bootctl-random-seed.h diff --git a/src/boot/bootctl-reboot-to-firmware.c b/src/bootctl/bootctl-reboot-to-firmware.c similarity index 100% rename from src/boot/bootctl-reboot-to-firmware.c rename to src/bootctl/bootctl-reboot-to-firmware.c diff --git a/src/boot/bootctl-reboot-to-firmware.h b/src/bootctl/bootctl-reboot-to-firmware.h similarity index 100% rename from src/boot/bootctl-reboot-to-firmware.h rename to src/bootctl/bootctl-reboot-to-firmware.h diff --git a/src/boot/bootctl-set-efivar.c b/src/bootctl/bootctl-set-efivar.c similarity index 100% rename from src/boot/bootctl-set-efivar.c rename to src/bootctl/bootctl-set-efivar.c diff --git a/src/boot/bootctl-set-efivar.h b/src/bootctl/bootctl-set-efivar.h similarity index 100% rename from src/boot/bootctl-set-efivar.h rename to src/bootctl/bootctl-set-efivar.h diff --git a/src/boot/bootctl-status.c b/src/bootctl/bootctl-status.c similarity index 100% rename from src/boot/bootctl-status.c rename to src/bootctl/bootctl-status.c diff --git a/src/boot/bootctl-status.h b/src/bootctl/bootctl-status.h similarity index 100% rename from src/boot/bootctl-status.h rename to src/bootctl/bootctl-status.h diff --git a/src/boot/bootctl-systemd-efi-options.c b/src/bootctl/bootctl-systemd-efi-options.c similarity index 100% rename from src/boot/bootctl-systemd-efi-options.c rename to src/bootctl/bootctl-systemd-efi-options.c diff --git a/src/boot/bootctl-systemd-efi-options.h b/src/bootctl/bootctl-systemd-efi-options.h similarity index 100% rename from src/boot/bootctl-systemd-efi-options.h rename to src/bootctl/bootctl-systemd-efi-options.h diff --git a/src/boot/bootctl-uki.c b/src/bootctl/bootctl-uki.c similarity index 100% rename from src/boot/bootctl-uki.c rename to src/bootctl/bootctl-uki.c diff --git a/src/boot/bootctl-uki.h b/src/bootctl/bootctl-uki.h similarity index 100% rename from src/boot/bootctl-uki.h rename to src/bootctl/bootctl-uki.h diff --git a/src/boot/bootctl-util.c b/src/bootctl/bootctl-util.c similarity index 100% rename from src/boot/bootctl-util.c rename to src/bootctl/bootctl-util.c diff --git a/src/boot/bootctl-util.h b/src/bootctl/bootctl-util.h similarity index 100% rename from src/boot/bootctl-util.h rename to src/bootctl/bootctl-util.h diff --git a/src/boot/bootctl.c b/src/bootctl/bootctl.c similarity index 100% rename from src/boot/bootctl.c rename to src/bootctl/bootctl.c diff --git a/src/boot/bootctl.h b/src/bootctl/bootctl.h similarity index 100% rename from src/boot/bootctl.h rename to src/bootctl/bootctl.h diff --git a/src/bootctl/meson.build b/src/bootctl/meson.build new file mode 100644 index 00000000000..bcd12a2f612 --- /dev/null +++ b/src/bootctl/meson.build @@ -0,0 +1,26 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later + +bootctl_sources = files( + 'bootctl-install.c', + 'bootctl-random-seed.c', + 'bootctl-reboot-to-firmware.c', + 'bootctl-set-efivar.c', + 'bootctl-status.c', + 'bootctl-systemd-efi-options.c', + 'bootctl-uki.c', + 'bootctl-util.c', + 'bootctl.c', +) + +executables += [ + executable_template + { + 'name' : 'bootctl', + 'public' : true, + 'conditions' : [ + 'HAVE_BLKID', + ], + 'sources' : bootctl_sources, + 'link_with' : boot_link_with, + 'dependencies' : [libblkid, libopenssl], + }, +]