SSECn0gIW cV4Ww/Bd71BnTL0q69YhQxnItmJSalKtYuEJnzAicQsj8TRIROX5CGfPu6phGPIS5Us0l8 wYalQAyFNU0HI75mRfcsDuGJ5cXY+iW7IVUz+QZda5UcgELSZpZzRN7RelWb5g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4b5ftV2Nn5z1BZN; Mon, 26 May 2025 15:33:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 54QFXcTk045233; Mon, 26 May 2025 15:33:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 54QFXcOr045230; Mon, 26 May 2025 15:33:38 GMT (envelope-from git) Date: Mon, 26 May 2025 15:33:38 GMT Message-Id: <202505261533.54QFXcOr045230@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 26178196de73 - main - stand/userboot: Initialize archsw at compile time List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 26178196de7345cdef047ef5b953101d0b50d41f Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=26178196de7345cdef047ef5b953101d0b50d41f commit 26178196de7345cdef047ef5b953101d0b50d41f Author: Warner Losh AuthorDate: 2025-05-26 03:52:34 +0000 Commit: Warner Losh CommitDate: 2025-05-26 15:30:38 +0000 stand/userboot: Initialize archsw at compile time Sponsored by: Netflix --- stand/userboot/userboot/main.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/stand/userboot/userboot/main.c b/stand/userboot/userboot/main.c index cf1d9b12d69f..53b76c685d92 100644 --- a/stand/userboot/userboot/main.c +++ b/stand/userboot/userboot/main.c @@ -55,7 +55,16 @@ void *callbacks_arg; static jmp_buf jb; -struct arch_switch archsw; /* MI/MD interface boundary */ +struct arch_switch archsw = { /* MI/MD interface boundary */ + .arch_autoload = userboot_autoload, + .arch_getdev = userboot_getdev, + .arch_copyin = userboot_copyin, + .arch_copyout = userboot_copyout, + .arch_readin = userboot_readin, +#if defined(USERBOOT_ZFS_SUPPORT) + .arch_zfs_probe = userboot_zfs_probe, +#endif +}; static void extract_currdev(void); static void check_interpreter(void); @@ -189,15 +198,6 @@ loader_main(struct loader_callbacks *cb, void *arg, int version, int ndisks) putenv(var); } - archsw.arch_autoload = userboot_autoload; - archsw.arch_getdev = userboot_getdev; - archsw.arch_copyin = userboot_copyin; - archsw.arch_copyout = userboot_copyout; - archsw.arch_readin = userboot_readin; -#if defined(USERBOOT_ZFS_SUPPORT) - archsw.arch_zfs_probe = userboot_zfs_probe; -#endif - /* * Initialise the block cache. Set the upper limit. */