aboutsummaryrefslogtreecommitdiff
path: root/sys/boot/userboot/test/test.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/boot/userboot/test/test.c')
-rw-r--r--sys/boot/userboot/test/test.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/sys/boot/userboot/test/test.c b/sys/boot/userboot/test/test.c
index d7ec3e4b5e99..d5707de216a8 100644
--- a/sys/boot/userboot/test/test.c
+++ b/sys/boot/userboot/test/test.c
@@ -414,7 +414,7 @@ void
usage()
{
- printf("usage: [-d <disk image path>] [-h <host filesystem path>\n");
+ printf("usage: [-b <userboot shared object>] [-d <disk image path>] [-h <host filesystem path>\n");
exit(1);
}
@@ -425,9 +425,14 @@ main(int argc, char** argv)
void (*func)(struct loader_callbacks *, void *, int, int);
int opt;
char *disk_image = NULL;
+ const char *userboot_obj = "/boot/userboot.so";
- while ((opt = getopt(argc, argv, "d:h:")) != -1) {
+ while ((opt = getopt(argc, argv, "b:d:h:")) != -1) {
switch (opt) {
+ case 'b':
+ userboot_obj = optarg;
+ break;
+
case 'd':
disk_image = optarg;
break;
@@ -441,8 +446,7 @@ main(int argc, char** argv)
}
}
- h = dlopen("/boot/userboot.so",
- RTLD_LOCAL);
+ h = dlopen(userboot_obj, RTLD_LOCAL);
if (!h) {
printf("%s\n", dlerror());
return (1);