summaryrefslogtreecommitdiff
path: root/Userland/modload.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-11-29 21:19:23 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-11-29 21:19:23 +0100
commit86c61218a7da9988ffd2fa7a773fdeef8634d245 (patch)
tree61d8ed7433e7f31cead14d02497a5abad9cc7937 /Userland/modload.cpp
parent3ad0e6e198b5b0a3ee843c5005111d162f53c453 (diff)
downloadserenity-86c61218a7da9988ffd2fa7a773fdeef8634d245.zip
modload: Take the module-to-load as a command-line argument
Instead of hard-coding /mod/TestModule.o :^)
Diffstat (limited to 'Userland/modload.cpp')
-rw-r--r--Userland/modload.cpp9
1 files 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 <module.o>\n", argv[0]);
+ return 0;
+ }
+
+ const char* path = argv[1];
int rc = module_load(path, strlen(path));
if (rc < 0) {
perror("module_load");