aboutsummaryrefslogtreecommitdiff
path: root/sys/boot/userboot
diff options
context:
space:
mode:
authorAndrey V. Elsukov <ae@FreeBSD.org>2012-08-05 17:04:58 +0000
committerAndrey V. Elsukov <ae@FreeBSD.org>2012-08-05 17:04:58 +0000
commit3db1bfd80da6f5514805d10cf12c878b3d3d5c83 (patch)
tree78750fa09bd92c3bfd517b61bc93b736726a9530 /sys/boot/userboot
parent59fa03faa3a72eee5c3b6aff6cb772604eed5081 (diff)
Notes
Diffstat (limited to 'sys/boot/userboot')
-rw-r--r--sys/boot/userboot/test/test.c2
-rw-r--r--sys/boot/userboot/userboot.h1
-rw-r--r--sys/boot/userboot/userboot/main.c4
3 files changed, 5 insertions, 2 deletions
diff --git a/sys/boot/userboot/test/test.c b/sys/boot/userboot/test/test.c
index 8745d315cbf51..63cb5e80e5d32 100644
--- a/sys/boot/userboot/test/test.c
+++ b/sys/boot/userboot/test/test.c
@@ -450,5 +450,5 @@ main(int argc, char** argv)
term.c_lflag &= ~(ICANON|ECHO);
tcsetattr(0, TCSAFLUSH, &term);
- func(&cb, NULL, USERBOOT_VERSION_1, disk_fd >= 0);
+ func(&cb, NULL, USERBOOT_VERSION_2, disk_fd >= 0);
}
diff --git a/sys/boot/userboot/userboot.h b/sys/boot/userboot/userboot.h
index 9b0572e5ab007..9e00899249780 100644
--- a/sys/boot/userboot/userboot.h
+++ b/sys/boot/userboot/userboot.h
@@ -30,6 +30,7 @@
* USERBOOT interface versions
*/
#define USERBOOT_VERSION_1 1
+#define USERBOOT_VERSION_2 2
/*
* Exit codes from the loader
diff --git a/sys/boot/userboot/userboot/main.c b/sys/boot/userboot/userboot/main.c
index d01d95e5b4d95..fb2ca64d99f62 100644
--- a/sys/boot/userboot/userboot/main.c
+++ b/sys/boot/userboot/userboot/main.c
@@ -36,6 +36,8 @@ __FBSDID("$FreeBSD$");
#include "disk.h"
#include "libuserboot.h"
+#define USERBOOT_VERSION USERBOOT_VERSION_2
+
struct loader_callbacks_v1 *callbacks;
void *callbacks_arg;
@@ -70,7 +72,7 @@ loader_main(struct loader_callbacks_v1 *cb, void *arg, int version, int ndisks)
static char malloc[512*1024];
int i;
- if (version != USERBOOT_VERSION_1)
+ if (version != USERBOOT_VERSION)
abort();
callbacks = cb;