aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2024-02-21 15:50:31 +0000
committerWarner Losh <imp@FreeBSD.org>2024-04-16 19:54:26 +0000
commit92f8c2f636e0ade6a5986c0be449ccf819f8b2be (patch)
treea23cea20afd956e77bf4aba94d56a2e226998873
parente9620c27f176ef66abe128bcb17df37eac46c6e6 (diff)
loader/efi: Make gcc friendlier by move md_dev
Move the extern struct devsw md_dev out of the function. gcc is happier with this arrangemnt often. However, we really should move it to a header file, but that requires a bit of a rework of md support and config. Sponsored by: Netflix Reviewed by: manu, tsoome Differential Revision: https://reviews.freebsd.org/D44008 (cherry picked from commit b2822c40f61d351bf8a4cac87e12521db06ff962)
-rw-r--r--stand/efi/loader/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/stand/efi/loader/main.c b/stand/efi/loader/main.c
index d7cffe5f6df9..5944c383574e 100644
--- a/stand/efi/loader/main.c
+++ b/stand/efi/loader/main.c
@@ -278,10 +278,11 @@ probe_zfs_currdev(uint64_t guid)
#endif
#ifdef MD_IMAGE_SIZE
+extern struct devsw md_dev;
+
static bool
probe_md_currdev(void)
{
- extern struct devsw md_dev;
bool rv;
set_currdev_devsw(&md_dev, 0);