2020-01-18 11:38:21 +03:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
|
|
|
*
|
2021-04-22 11:24:48 +03:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-01-18 11:38:21 +03:00
|
|
|
*/
|
|
|
|
|
2020-08-05 22:00:18 +03:00
|
|
|
#include <LibCore/ArgsParser.h>
|
2019-11-28 22:59:11 +03:00
|
|
|
#include <serenity.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
int main(int argc, char** argv)
|
|
|
|
{
|
2020-08-05 22:00:18 +03:00
|
|
|
const char* path = nullptr;
|
|
|
|
|
|
|
|
Core::ArgsParser args_parser;
|
|
|
|
args_parser.add_positional_argument(path, "Path to the module to load", "path");
|
|
|
|
args_parser.parse(argc, argv);
|
2019-11-29 23:19:23 +03:00
|
|
|
|
2019-11-28 22:59:11 +03:00
|
|
|
int rc = module_load(path, strlen(path));
|
|
|
|
if (rc < 0) {
|
|
|
|
perror("module_load");
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|