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. */