From 97318131fd06a5bc35454da81dcbbc84f16d9940 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 7 Nov 2024 12:45:28 +0100 Subject: [PATCH] Rename src/boot/efi to just src/boot I very much dislike the approach in which we were mixing Linux and UEFI C code in the same subdirectory. No code was shared between two environments. This layout was created in e7dd673d1e0acfe5420599588c559fd85a3a9e8f, with the justification of "being more consistent with the rest of systemd", but I don't see how it's supposed to be so. Originally, when the C code was just a single bootctl.c file, this wasn't so bad. But over time the userspace code grew quite a bit. With the moves done in previuos commits, the intermediate subdirectory is now empty except for the efi/ subdir, and this additional subdirectory level doesn't have a good justification. The components is called "systemd-boot", not "systemd-efi", and we can remove one level of indentation. --- meson.build | 2 +- src/boot/{efi => }/UEFI_SECURITY.md | 0 src/boot/{efi => }/addon.c | 0 src/boot/{efi => }/bcd.c | 0 src/boot/{efi => }/bcd.h | 0 src/boot/{efi => }/boot.c | 0 src/boot/{efi => }/chid.c | 0 src/boot/{efi => }/chid.h | 0 src/boot/{efi => }/console.c | 0 src/boot/{efi => }/console.h | 0 src/boot/{efi => }/cpio.c | 0 src/boot/{efi => }/cpio.h | 0 src/boot/{efi => }/device-path-util.c | 0 src/boot/{efi => }/device-path-util.h | 0 src/boot/{efi => }/devicetree.c | 0 src/boot/{efi => }/devicetree.h | 0 src/boot/{efi => }/drivers.c | 0 src/boot/{efi => }/drivers.h | 0 src/boot/{efi => }/efi-string.c | 0 src/boot/{efi => }/efi-string.h | 0 src/boot/{efi => }/efi.h | 0 src/boot/{efi => }/efivars.c | 0 src/boot/{efi => }/efivars.h | 0 src/boot/{efi => }/export-vars.c | 0 src/boot/{efi => }/export-vars.h | 0 src/boot/{efi => }/fuzz-bcd.c | 0 src/boot/{efi => }/fuzz-efi-osrel.c | 0 src/boot/{efi => }/fuzz-efi-printf.c | 0 src/boot/{efi => }/fuzz-efi-string.c | 0 src/boot/{efi => }/graphics.c | 0 src/boot/{efi => }/graphics.h | 0 src/boot/{efi => }/initrd.c | 0 src/boot/{efi => }/initrd.h | 0 src/boot/{efi => }/linux.c | 0 src/boot/{efi => }/linux.h | 0 src/boot/{efi => }/linux_x86.c | 0 src/boot/{efi => }/log.c | 0 src/boot/{efi => }/log.h | 0 src/boot/{efi => }/measure.c | 0 src/boot/{efi => }/measure.h | 0 src/boot/{efi => }/meson.build | 0 src/boot/{efi => }/part-discovery.c | 0 src/boot/{efi => }/part-discovery.h | 0 src/boot/{efi => }/pe.c | 0 src/boot/{efi => }/pe.h | 0 src/boot/{efi => }/proto/block-io.h | 0 src/boot/{efi => }/proto/cc-measurement.h | 0 src/boot/{efi => }/proto/console-control.h | 0 src/boot/{efi => }/proto/device-path.h | 0 src/boot/{efi => }/proto/dt-fixup.h | 0 src/boot/{efi => }/proto/file-io.h | 0 src/boot/{efi => }/proto/graphics-output.h | 0 src/boot/{efi => }/proto/load-file.h | 0 src/boot/{efi => }/proto/loaded-image.h | 0 src/boot/{efi => }/proto/rng.h | 0 src/boot/{efi => }/proto/security-arch.h | 0 src/boot/{efi => }/proto/shell-parameters.h | 0 src/boot/{efi => }/proto/simple-text-io.h | 0 src/boot/{efi => }/proto/tcg.h | 0 src/boot/{efi => }/random-seed.c | 0 src/boot/{efi => }/random-seed.h | 0 src/boot/{efi => }/secure-boot.c | 0 src/boot/{efi => }/secure-boot.h | 0 src/boot/{efi => }/shim.c | 0 src/boot/{efi => }/shim.h | 0 src/boot/{efi => }/smbios.c | 0 src/boot/{efi => }/smbios.h | 0 src/boot/{efi => }/splash.c | 0 src/boot/{efi => }/splash.h | 0 src/boot/{efi => }/stub.c | 0 src/boot/{efi => }/test-bcd.c | 0 src/boot/{efi => }/test-efi-string.c | 0 src/boot/{efi => }/ticks.c | 0 src/boot/{efi => }/ticks.h | 0 src/boot/{efi => }/ubsan.c | 0 src/boot/{efi => }/util.c | 0 src/boot/{efi => }/util.h | 0 src/boot/{efi => }/vmm.c | 0 src/boot/{efi => }/vmm.h | 0 79 files changed, 1 insertion(+), 1 deletion(-) rename src/boot/{efi => }/UEFI_SECURITY.md (100%) rename src/boot/{efi => }/addon.c (100%) rename src/boot/{efi => }/bcd.c (100%) rename src/boot/{efi => }/bcd.h (100%) rename src/boot/{efi => }/boot.c (100%) rename src/boot/{efi => }/chid.c (100%) rename src/boot/{efi => }/chid.h (100%) rename src/boot/{efi => }/console.c (100%) rename src/boot/{efi => }/console.h (100%) rename src/boot/{efi => }/cpio.c (100%) rename src/boot/{efi => }/cpio.h (100%) rename src/boot/{efi => }/device-path-util.c (100%) rename src/boot/{efi => }/device-path-util.h (100%) rename src/boot/{efi => }/devicetree.c (100%) rename src/boot/{efi => }/devicetree.h (100%) rename src/boot/{efi => }/drivers.c (100%) rename src/boot/{efi => }/drivers.h (100%) rename src/boot/{efi => }/efi-string.c (100%) rename src/boot/{efi => }/efi-string.h (100%) rename src/boot/{efi => }/efi.h (100%) rename src/boot/{efi => }/efivars.c (100%) rename src/boot/{efi => }/efivars.h (100%) rename src/boot/{efi => }/export-vars.c (100%) rename src/boot/{efi => }/export-vars.h (100%) rename src/boot/{efi => }/fuzz-bcd.c (100%) rename src/boot/{efi => }/fuzz-efi-osrel.c (100%) rename src/boot/{efi => }/fuzz-efi-printf.c (100%) rename src/boot/{efi => }/fuzz-efi-string.c (100%) rename src/boot/{efi => }/graphics.c (100%) rename src/boot/{efi => }/graphics.h (100%) rename src/boot/{efi => }/initrd.c (100%) rename src/boot/{efi => }/initrd.h (100%) rename src/boot/{efi => }/linux.c (100%) rename src/boot/{efi => }/linux.h (100%) rename src/boot/{efi => }/linux_x86.c (100%) rename src/boot/{efi => }/log.c (100%) rename src/boot/{efi => }/log.h (100%) rename src/boot/{efi => }/measure.c (100%) rename src/boot/{efi => }/measure.h (100%) rename src/boot/{efi => }/meson.build (100%) rename src/boot/{efi => }/part-discovery.c (100%) rename src/boot/{efi => }/part-discovery.h (100%) rename src/boot/{efi => }/pe.c (100%) rename src/boot/{efi => }/pe.h (100%) rename src/boot/{efi => }/proto/block-io.h (100%) rename src/boot/{efi => }/proto/cc-measurement.h (100%) rename src/boot/{efi => }/proto/console-control.h (100%) rename src/boot/{efi => }/proto/device-path.h (100%) rename src/boot/{efi => }/proto/dt-fixup.h (100%) rename src/boot/{efi => }/proto/file-io.h (100%) rename src/boot/{efi => }/proto/graphics-output.h (100%) rename src/boot/{efi => }/proto/load-file.h (100%) rename src/boot/{efi => }/proto/loaded-image.h (100%) rename src/boot/{efi => }/proto/rng.h (100%) rename src/boot/{efi => }/proto/security-arch.h (100%) rename src/boot/{efi => }/proto/shell-parameters.h (100%) rename src/boot/{efi => }/proto/simple-text-io.h (100%) rename src/boot/{efi => }/proto/tcg.h (100%) rename src/boot/{efi => }/random-seed.c (100%) rename src/boot/{efi => }/random-seed.h (100%) rename src/boot/{efi => }/secure-boot.c (100%) rename src/boot/{efi => }/secure-boot.h (100%) rename src/boot/{efi => }/shim.c (100%) rename src/boot/{efi => }/shim.h (100%) rename src/boot/{efi => }/smbios.c (100%) rename src/boot/{efi => }/smbios.h (100%) rename src/boot/{efi => }/splash.c (100%) rename src/boot/{efi => }/splash.h (100%) rename src/boot/{efi => }/stub.c (100%) rename src/boot/{efi => }/test-bcd.c (100%) rename src/boot/{efi => }/test-efi-string.c (100%) rename src/boot/{efi => }/ticks.c (100%) rename src/boot/{efi => }/ticks.h (100%) rename src/boot/{efi => }/ubsan.c (100%) rename src/boot/{efi => }/util.c (100%) rename src/boot/{efi => }/util.h (100%) rename src/boot/{efi => }/vmm.c (100%) rename src/boot/{efi => }/vmm.h (100%) diff --git a/meson.build b/meson.build index f2b5ce5ea2b..6b62dfa052d 100644 --- a/meson.build +++ b/meson.build @@ -2345,7 +2345,7 @@ subdir('src/backlight') subdir('src/battery-check') subdir('src/binfmt') subdir('src/bless-boot') -subdir('src/boot/efi') +subdir('src/boot') subdir('src/bootctl') subdir('src/busctl') subdir('src/cgls') diff --git a/src/boot/efi/UEFI_SECURITY.md b/src/boot/UEFI_SECURITY.md similarity index 100% rename from src/boot/efi/UEFI_SECURITY.md rename to src/boot/UEFI_SECURITY.md diff --git a/src/boot/efi/addon.c b/src/boot/addon.c similarity index 100% rename from src/boot/efi/addon.c rename to src/boot/addon.c diff --git a/src/boot/efi/bcd.c b/src/boot/bcd.c similarity index 100% rename from src/boot/efi/bcd.c rename to src/boot/bcd.c diff --git a/src/boot/efi/bcd.h b/src/boot/bcd.h similarity index 100% rename from src/boot/efi/bcd.h rename to src/boot/bcd.h diff --git a/src/boot/efi/boot.c b/src/boot/boot.c similarity index 100% rename from src/boot/efi/boot.c rename to src/boot/boot.c diff --git a/src/boot/efi/chid.c b/src/boot/chid.c similarity index 100% rename from src/boot/efi/chid.c rename to src/boot/chid.c diff --git a/src/boot/efi/chid.h b/src/boot/chid.h similarity index 100% rename from src/boot/efi/chid.h rename to src/boot/chid.h diff --git a/src/boot/efi/console.c b/src/boot/console.c similarity index 100% rename from src/boot/efi/console.c rename to src/boot/console.c diff --git a/src/boot/efi/console.h b/src/boot/console.h similarity index 100% rename from src/boot/efi/console.h rename to src/boot/console.h diff --git a/src/boot/efi/cpio.c b/src/boot/cpio.c similarity index 100% rename from src/boot/efi/cpio.c rename to src/boot/cpio.c diff --git a/src/boot/efi/cpio.h b/src/boot/cpio.h similarity index 100% rename from src/boot/efi/cpio.h rename to src/boot/cpio.h diff --git a/src/boot/efi/device-path-util.c b/src/boot/device-path-util.c similarity index 100% rename from src/boot/efi/device-path-util.c rename to src/boot/device-path-util.c diff --git a/src/boot/efi/device-path-util.h b/src/boot/device-path-util.h similarity index 100% rename from src/boot/efi/device-path-util.h rename to src/boot/device-path-util.h diff --git a/src/boot/efi/devicetree.c b/src/boot/devicetree.c similarity index 100% rename from src/boot/efi/devicetree.c rename to src/boot/devicetree.c diff --git a/src/boot/efi/devicetree.h b/src/boot/devicetree.h similarity index 100% rename from src/boot/efi/devicetree.h rename to src/boot/devicetree.h diff --git a/src/boot/efi/drivers.c b/src/boot/drivers.c similarity index 100% rename from src/boot/efi/drivers.c rename to src/boot/drivers.c diff --git a/src/boot/efi/drivers.h b/src/boot/drivers.h similarity index 100% rename from src/boot/efi/drivers.h rename to src/boot/drivers.h diff --git a/src/boot/efi/efi-string.c b/src/boot/efi-string.c similarity index 100% rename from src/boot/efi/efi-string.c rename to src/boot/efi-string.c diff --git a/src/boot/efi/efi-string.h b/src/boot/efi-string.h similarity index 100% rename from src/boot/efi/efi-string.h rename to src/boot/efi-string.h diff --git a/src/boot/efi/efi.h b/src/boot/efi.h similarity index 100% rename from src/boot/efi/efi.h rename to src/boot/efi.h diff --git a/src/boot/efi/efivars.c b/src/boot/efivars.c similarity index 100% rename from src/boot/efi/efivars.c rename to src/boot/efivars.c diff --git a/src/boot/efi/efivars.h b/src/boot/efivars.h similarity index 100% rename from src/boot/efi/efivars.h rename to src/boot/efivars.h diff --git a/src/boot/efi/export-vars.c b/src/boot/export-vars.c similarity index 100% rename from src/boot/efi/export-vars.c rename to src/boot/export-vars.c diff --git a/src/boot/efi/export-vars.h b/src/boot/export-vars.h similarity index 100% rename from src/boot/efi/export-vars.h rename to src/boot/export-vars.h diff --git a/src/boot/efi/fuzz-bcd.c b/src/boot/fuzz-bcd.c similarity index 100% rename from src/boot/efi/fuzz-bcd.c rename to src/boot/fuzz-bcd.c diff --git a/src/boot/efi/fuzz-efi-osrel.c b/src/boot/fuzz-efi-osrel.c similarity index 100% rename from src/boot/efi/fuzz-efi-osrel.c rename to src/boot/fuzz-efi-osrel.c diff --git a/src/boot/efi/fuzz-efi-printf.c b/src/boot/fuzz-efi-printf.c similarity index 100% rename from src/boot/efi/fuzz-efi-printf.c rename to src/boot/fuzz-efi-printf.c diff --git a/src/boot/efi/fuzz-efi-string.c b/src/boot/fuzz-efi-string.c similarity index 100% rename from src/boot/efi/fuzz-efi-string.c rename to src/boot/fuzz-efi-string.c diff --git a/src/boot/efi/graphics.c b/src/boot/graphics.c similarity index 100% rename from src/boot/efi/graphics.c rename to src/boot/graphics.c diff --git a/src/boot/efi/graphics.h b/src/boot/graphics.h similarity index 100% rename from src/boot/efi/graphics.h rename to src/boot/graphics.h diff --git a/src/boot/efi/initrd.c b/src/boot/initrd.c similarity index 100% rename from src/boot/efi/initrd.c rename to src/boot/initrd.c diff --git a/src/boot/efi/initrd.h b/src/boot/initrd.h similarity index 100% rename from src/boot/efi/initrd.h rename to src/boot/initrd.h diff --git a/src/boot/efi/linux.c b/src/boot/linux.c similarity index 100% rename from src/boot/efi/linux.c rename to src/boot/linux.c diff --git a/src/boot/efi/linux.h b/src/boot/linux.h similarity index 100% rename from src/boot/efi/linux.h rename to src/boot/linux.h diff --git a/src/boot/efi/linux_x86.c b/src/boot/linux_x86.c similarity index 100% rename from src/boot/efi/linux_x86.c rename to src/boot/linux_x86.c diff --git a/src/boot/efi/log.c b/src/boot/log.c similarity index 100% rename from src/boot/efi/log.c rename to src/boot/log.c diff --git a/src/boot/efi/log.h b/src/boot/log.h similarity index 100% rename from src/boot/efi/log.h rename to src/boot/log.h diff --git a/src/boot/efi/measure.c b/src/boot/measure.c similarity index 100% rename from src/boot/efi/measure.c rename to src/boot/measure.c diff --git a/src/boot/efi/measure.h b/src/boot/measure.h similarity index 100% rename from src/boot/efi/measure.h rename to src/boot/measure.h diff --git a/src/boot/efi/meson.build b/src/boot/meson.build similarity index 100% rename from src/boot/efi/meson.build rename to src/boot/meson.build diff --git a/src/boot/efi/part-discovery.c b/src/boot/part-discovery.c similarity index 100% rename from src/boot/efi/part-discovery.c rename to src/boot/part-discovery.c diff --git a/src/boot/efi/part-discovery.h b/src/boot/part-discovery.h similarity index 100% rename from src/boot/efi/part-discovery.h rename to src/boot/part-discovery.h diff --git a/src/boot/efi/pe.c b/src/boot/pe.c similarity index 100% rename from src/boot/efi/pe.c rename to src/boot/pe.c diff --git a/src/boot/efi/pe.h b/src/boot/pe.h similarity index 100% rename from src/boot/efi/pe.h rename to src/boot/pe.h diff --git a/src/boot/efi/proto/block-io.h b/src/boot/proto/block-io.h similarity index 100% rename from src/boot/efi/proto/block-io.h rename to src/boot/proto/block-io.h diff --git a/src/boot/efi/proto/cc-measurement.h b/src/boot/proto/cc-measurement.h similarity index 100% rename from src/boot/efi/proto/cc-measurement.h rename to src/boot/proto/cc-measurement.h diff --git a/src/boot/efi/proto/console-control.h b/src/boot/proto/console-control.h similarity index 100% rename from src/boot/efi/proto/console-control.h rename to src/boot/proto/console-control.h diff --git a/src/boot/efi/proto/device-path.h b/src/boot/proto/device-path.h similarity index 100% rename from src/boot/efi/proto/device-path.h rename to src/boot/proto/device-path.h diff --git a/src/boot/efi/proto/dt-fixup.h b/src/boot/proto/dt-fixup.h similarity index 100% rename from src/boot/efi/proto/dt-fixup.h rename to src/boot/proto/dt-fixup.h diff --git a/src/boot/efi/proto/file-io.h b/src/boot/proto/file-io.h similarity index 100% rename from src/boot/efi/proto/file-io.h rename to src/boot/proto/file-io.h diff --git a/src/boot/efi/proto/graphics-output.h b/src/boot/proto/graphics-output.h similarity index 100% rename from src/boot/efi/proto/graphics-output.h rename to src/boot/proto/graphics-output.h diff --git a/src/boot/efi/proto/load-file.h b/src/boot/proto/load-file.h similarity index 100% rename from src/boot/efi/proto/load-file.h rename to src/boot/proto/load-file.h diff --git a/src/boot/efi/proto/loaded-image.h b/src/boot/proto/loaded-image.h similarity index 100% rename from src/boot/efi/proto/loaded-image.h rename to src/boot/proto/loaded-image.h diff --git a/src/boot/efi/proto/rng.h b/src/boot/proto/rng.h similarity index 100% rename from src/boot/efi/proto/rng.h rename to src/boot/proto/rng.h diff --git a/src/boot/efi/proto/security-arch.h b/src/boot/proto/security-arch.h similarity index 100% rename from src/boot/efi/proto/security-arch.h rename to src/boot/proto/security-arch.h diff --git a/src/boot/efi/proto/shell-parameters.h b/src/boot/proto/shell-parameters.h similarity index 100% rename from src/boot/efi/proto/shell-parameters.h rename to src/boot/proto/shell-parameters.h diff --git a/src/boot/efi/proto/simple-text-io.h b/src/boot/proto/simple-text-io.h similarity index 100% rename from src/boot/efi/proto/simple-text-io.h rename to src/boot/proto/simple-text-io.h diff --git a/src/boot/efi/proto/tcg.h b/src/boot/proto/tcg.h similarity index 100% rename from src/boot/efi/proto/tcg.h rename to src/boot/proto/tcg.h diff --git a/src/boot/efi/random-seed.c b/src/boot/random-seed.c similarity index 100% rename from src/boot/efi/random-seed.c rename to src/boot/random-seed.c diff --git a/src/boot/efi/random-seed.h b/src/boot/random-seed.h similarity index 100% rename from src/boot/efi/random-seed.h rename to src/boot/random-seed.h diff --git a/src/boot/efi/secure-boot.c b/src/boot/secure-boot.c similarity index 100% rename from src/boot/efi/secure-boot.c rename to src/boot/secure-boot.c diff --git a/src/boot/efi/secure-boot.h b/src/boot/secure-boot.h similarity index 100% rename from src/boot/efi/secure-boot.h rename to src/boot/secure-boot.h diff --git a/src/boot/efi/shim.c b/src/boot/shim.c similarity index 100% rename from src/boot/efi/shim.c rename to src/boot/shim.c diff --git a/src/boot/efi/shim.h b/src/boot/shim.h similarity index 100% rename from src/boot/efi/shim.h rename to src/boot/shim.h diff --git a/src/boot/efi/smbios.c b/src/boot/smbios.c similarity index 100% rename from src/boot/efi/smbios.c rename to src/boot/smbios.c diff --git a/src/boot/efi/smbios.h b/src/boot/smbios.h similarity index 100% rename from src/boot/efi/smbios.h rename to src/boot/smbios.h diff --git a/src/boot/efi/splash.c b/src/boot/splash.c similarity index 100% rename from src/boot/efi/splash.c rename to src/boot/splash.c diff --git a/src/boot/efi/splash.h b/src/boot/splash.h similarity index 100% rename from src/boot/efi/splash.h rename to src/boot/splash.h diff --git a/src/boot/efi/stub.c b/src/boot/stub.c similarity index 100% rename from src/boot/efi/stub.c rename to src/boot/stub.c diff --git a/src/boot/efi/test-bcd.c b/src/boot/test-bcd.c similarity index 100% rename from src/boot/efi/test-bcd.c rename to src/boot/test-bcd.c diff --git a/src/boot/efi/test-efi-string.c b/src/boot/test-efi-string.c similarity index 100% rename from src/boot/efi/test-efi-string.c rename to src/boot/test-efi-string.c diff --git a/src/boot/efi/ticks.c b/src/boot/ticks.c similarity index 100% rename from src/boot/efi/ticks.c rename to src/boot/ticks.c diff --git a/src/boot/efi/ticks.h b/src/boot/ticks.h similarity index 100% rename from src/boot/efi/ticks.h rename to src/boot/ticks.h diff --git a/src/boot/efi/ubsan.c b/src/boot/ubsan.c similarity index 100% rename from src/boot/efi/ubsan.c rename to src/boot/ubsan.c diff --git a/src/boot/efi/util.c b/src/boot/util.c similarity index 100% rename from src/boot/efi/util.c rename to src/boot/util.c diff --git a/src/boot/efi/util.h b/src/boot/util.h similarity index 100% rename from src/boot/efi/util.h rename to src/boot/util.h diff --git a/src/boot/efi/vmm.c b/src/boot/vmm.c similarity index 100% rename from src/boot/efi/vmm.c rename to src/boot/vmm.c diff --git a/src/boot/efi/vmm.h b/src/boot/vmm.h similarity index 100% rename from src/boot/efi/vmm.h rename to src/boot/vmm.h