Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Feb 2024 15:51:38 GMT
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: b2822c40f61d - main - loader/efi: Make gcc friendlier by move md_dev
Message-ID:  <202402211551.41LFpcpZ023943@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=b2822c40f61d351bf8a4cac87e12521db06ff962

commit b2822c40f61d351bf8a4cac87e12521db06ff962
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2024-02-21 15:50:31 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2024-02-21 15:51:34 +0000

    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
---
 stand/efi/loader/main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202402211551.41LFpcpZ023943>