diff --git a/Userland/disasm.cpp b/Userland/disasm.cpp index 3cd61907da..a9fd354fc3 100644 --- a/Userland/disasm.cpp +++ b/Userland/disasm.cpp @@ -26,17 +26,19 @@ #include #include +#include #include #include int main(int argc, char** argv) { - if (argc == 1) { - fprintf(stderr, "usage: %s \n", argv[0]); - return 1; - } + const char* path = nullptr; - MappedFile file(argv[1]); + Core::ArgsParser args_parser; + args_parser.add_positional_argument(path, "Path to i386 binary file", "path"); + args_parser.parse(argc, argv); + + MappedFile file(path); if (!file.is_valid()) { // Already printed some error message. return 1;