From 86c61218a7da9988ffd2fa7a773fdeef8634d245 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 29 Nov 2019 21:19:23 +0100 Subject: [PATCH] modload: Take the module-to-load as a command-line argument Instead of hard-coding /mod/TestModule.o :^) --- Userland/modload.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Userland/modload.cpp b/Userland/modload.cpp index d0412a0fcd..2478aa01eb 100644 --- a/Userland/modload.cpp +++ b/Userland/modload.cpp @@ -3,9 +3,12 @@ int main(int argc, char** argv) { - (void)argc; - (void)argv; - const char* path = "/mod/TestModule.o"; + if (argc != 2) { + printf("usage: %s \n", argv[0]); + return 0; + } + + const char* path = argv[1]; int rc = module_load(path, strlen(path)); if (rc < 0) { perror("module_load");