Skip to content
Snippets Groups Projects
Commit 3efd1166 authored by Jan Včelák's avatar Jan Včelák :rocket:
Browse files

[dnssec] keymgr, add --version and --help

parent d0240a86
No related branches found
No related tags found
No related merge requests found
......@@ -905,6 +905,16 @@ static int cmd_keystore(int argc, char *argv[])
return subcommand(commands, argc, argv);
}
static void print_help(void)
{
printf("TBD.\n");
}
static void print_version(void)
{
printf("keymgr, version %s\n", PACKAGE_VERSION);
}
int main(int argc, char *argv[])
{
int exit_code = 1;
......@@ -917,7 +927,9 @@ int main(int argc, char *argv[])
// global options
static const struct option opts[] = {
{ "dir", required_argument, NULL, 'd' },
{ "dir", required_argument, NULL, 'd' },
{ "help", no_argument, NULL, 'h' },
{ "version", no_argument, NULL, 'V' },
{ NULL }
};
......@@ -928,6 +940,14 @@ int main(int argc, char *argv[])
free(global.kasp_dir);
global.kasp_dir = strdup(optarg);
break;
case 'h':
print_help();
exit_code = 0;
goto failed;
case 'V':
print_version();
exit_code = 0;
goto failed;
case '?':
goto failed;
default:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment