svn commit: r296097 - head/sys/boot/userboot/userboot
Marcel Moolenaar
marcel at FreeBSD.org
Fri Feb 26 15:52:57 UTC 2016
Author: marcel
Date: Fri Feb 26 15:52:55 2016
New Revision: 296097
URL: https://svnweb.freebsd.org/changeset/base/296097
Log:
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.
Modified:
head/sys/boot/userboot/userboot/main.c
Modified: head/sys/boot/userboot/userboot/main.c
==============================================================================
--- head/sys/boot/userboot/userboot/main.c Fri Feb 26 15:46:14 2016 (r296096)
+++ head/sys/boot/userboot/userboot/main.c Fri Feb 26 15:52:55 2016 (r296097)
@@ -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,
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,
*/
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)
More information about the svn-src-all
mailing list