diff options
Diffstat (limited to 'sys/boot/userboot/test/test.c')
-rw-r--r-- | sys/boot/userboot/test/test.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/sys/boot/userboot/test/test.c b/sys/boot/userboot/test/test.c index ef5c9a8..36258a7 100644 --- a/sys/boot/userboot/test/test.c +++ b/sys/boot/userboot/test/test.c @@ -364,6 +364,18 @@ test_getmem(void *arg, uint64_t *lowmem, uint64_t *highmem) *highmem = 0; } +const char * +test_getenv(void *arg, int idx) +{ + static const char *vars[] = { + "foo=bar", + "bar=barbar", + NULL + }; + + return (vars[idx]); +} + struct loader_callbacks cb = { .putc = test_putc, .getc = test_getc, @@ -391,6 +403,8 @@ struct loader_callbacks cb = { .delay = test_delay, .exit = test_exit, .getmem = test_getmem, + + .getenv = test_getenv, }; void @@ -450,5 +464,5 @@ main(int argc, char** argv) term.c_lflag &= ~(ICANON|ECHO); tcsetattr(0, TCSAFLUSH, &term); - func(&cb, NULL, USERBOOT_VERSION_2, disk_fd >= 0); + func(&cb, NULL, USERBOOT_VERSION_3, disk_fd >= 0); } |