mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 17:40:27 +00:00
modload: Take the module-to-load as a command-line argument
Instead of hard-coding /mod/TestModule.o :^)
This commit is contained in:
parent
3ad0e6e198
commit
86c61218a7
Notes:
sideshowbarker
2024-07-19 11:01:50 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/86c61218a7d
1 changed files with 6 additions and 3 deletions
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue