mirror of
https://git.freebsd.org/src.git
synced 2026-01-16 23:02:24 +00:00
stand/userboot: Initialize archsw at compile time
Sponsored by: Netflix
This commit is contained in:
parent
5b90ffad87
commit
26178196de
1 changed files with 10 additions and 10 deletions
|
|
@ -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.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue