git: b9f56cabeda4 - main - efi loader: Move 'module' variable under #ifdef MODINFOMD_MODULEP.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 27 Jun 2023 17:19:48 UTC
The branch main has been updated by jhb:
URL: https://cgit.FreeBSD.org/src/commit/?id=b9f56cabeda4c05c8dec1dd0315ccea45f5739da
commit b9f56cabeda4c05c8dec1dd0315ccea45f5739da
Author: John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2023-06-27 17:19:32 +0000
Commit: John Baldwin <jhb@FreeBSD.org>
CommitDate: 2023-06-27 17:19:32 +0000
efi loader: Move 'module' variable under #ifdef MODINFOMD_MODULEP.
This quiets a set but unused warning on platforms without this module
info such as aarch64.
Differential Revision: https://reviews.freebsd.org/D40672
---
stand/efi/loader/bootinfo.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/stand/efi/loader/bootinfo.c b/stand/efi/loader/bootinfo.c
index d79f59343af1..6dad3868b840 100644
--- a/stand/efi/loader/bootinfo.c
+++ b/stand/efi/loader/bootinfo.c
@@ -334,7 +334,10 @@ bi_load(char *args, vm_offset_t *modulep, vm_offset_t *kernendp, bool exit_bs)
struct devdesc *rootdev;
struct file_metadata *md;
vm_offset_t addr;
- uint64_t kernend, module;
+ uint64_t kernend;
+#ifdef MODINFOMD_MODULEP
+ uint64_t module;
+#endif
uint64_t envp;
vm_offset_t size;
char *rootdevname;
@@ -415,7 +418,7 @@ bi_load(char *args, vm_offset_t *modulep, vm_offset_t *kernendp, bool exit_bs)
kernend = 0; /* fill it in later */
/* Figure out the size and location of the metadata. */
- module = *modulep = addr;
+ *modulep = addr;
file_addmetadata(kfp, MODINFOMD_HOWTO, sizeof(howto), &howto);
file_addmetadata(kfp, MODINFOMD_ENVP, sizeof(envp), &envp);
@@ -428,6 +431,7 @@ bi_load(char *args, vm_offset_t *modulep, vm_offset_t *kernendp, bool exit_bs)
#endif
file_addmetadata(kfp, MODINFOMD_KERNEND, sizeof(kernend), &kernend);
#ifdef MODINFOMD_MODULEP
+ module = *modulep;
file_addmetadata(kfp, MODINFOMD_MODULEP, sizeof(module), &module);
#endif
#ifdef EFI