Skip to content
Snippets Groups Projects
Commit 371f730c authored by Adam Wujek's avatar Adam Wujek
Browse files

tools/ppsi_conf: print help if no option provided


Also allow to run without running PPSi.

Signed-off-by: default avatarAdam Wujek <dev_public@wujek.eu>
parent b07b8712
Branches
Tags
No related merge requests found
......@@ -152,7 +152,9 @@ int main(int argc, char *argv[])
int ppsi_instance = -1;
int ppsi_port = -1;
init_shm();
/* If no params print help */
if (argc == 1)
help(argv[0]);
while ((opt = getopt_long(argc, argv, "vh", long_opts, NULL)) != -1) {
if (opt == 'h' || opt == arg_help )
......@@ -178,6 +180,7 @@ int main(int argc, char *argv[])
}
}
init_shm();
/* Reset position of argument for getopt_long */
optind = 0;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment