Check that the userboot version is at least 3, rather than
3 exactly. The structure may be of a newer version and as long as it is backward compatible with 3, we can work with it. While here: whitespace nits.
This commit is contained in:
parent
ca8b902aa5
commit
8265d91646
@ -43,6 +43,7 @@ static void userboot_zfs_probe(void);
|
||||
static int userboot_zfs_found;
|
||||
#endif
|
||||
|
||||
/* Minimum version required */
|
||||
#define USERBOOT_VERSION USERBOOT_VERSION_3
|
||||
|
||||
#define MALLOCSZ (10*1024*1024)
|
||||
@ -64,7 +65,7 @@ void
|
||||
delay(int usec)
|
||||
{
|
||||
|
||||
CALLBACK(delay, usec);
|
||||
CALLBACK(delay, usec);
|
||||
}
|
||||
|
||||
void
|
||||
@ -82,11 +83,11 @@ loader_main(struct loader_callbacks *cb, void *arg, int version, int ndisks)
|
||||
const char *var;
|
||||
int i;
|
||||
|
||||
if (version != USERBOOT_VERSION)
|
||||
abort();
|
||||
if (version < USERBOOT_VERSION)
|
||||
abort();
|
||||
|
||||
callbacks = cb;
|
||||
callbacks_arg = arg;
|
||||
callbacks_arg = arg;
|
||||
userboot_disk_maxunit = ndisks;
|
||||
|
||||
/*
|
||||
@ -95,9 +96,9 @@ loader_main(struct loader_callbacks *cb, void *arg, int version, int ndisks)
|
||||
*/
|
||||
setheap((void *)mallocbuf, (void *)(mallocbuf + sizeof(mallocbuf)));
|
||||
|
||||
/*
|
||||
* Hook up the console
|
||||
*/
|
||||
/*
|
||||
* Hook up the console
|
||||
*/
|
||||
cons_probe();
|
||||
|
||||
printf("\n");
|
||||
@ -192,9 +193,9 @@ extract_currdev(void)
|
||||
}
|
||||
|
||||
env_setenv("currdev", EV_VOLATILE, userboot_fmtdev(&dev),
|
||||
userboot_setcurrdev, env_nounset);
|
||||
userboot_setcurrdev, env_nounset);
|
||||
env_setenv("loaddev", EV_VOLATILE, userboot_fmtdev(&dev),
|
||||
env_noset, env_nounset);
|
||||
env_noset, env_nounset);
|
||||
}
|
||||
|
||||
#if defined(USERBOOT_ZFS_SUPPORT)
|
||||
|
Loading…
Reference in New Issue
Block a user