Commit 8ddd03ea authored by Federico Vaga's avatar Federico Vaga

tools: improve help message

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent c5c3a537
......@@ -23,11 +23,16 @@
#include <errno.h>
#include <libmockturtle.h>
static void help()
/**
* It prints the help message
* @param[in] name the program name
*/
static void help(char *name)
{
fprintf(stderr, "\n");
fprintf(stderr, "lsmockturtle [options]\n\n");
fprintf(stderr, "It shows the current Mock Turtle available on the system.\n\n");
fprintf(stderr, "%s [options]\n\n", name);
fprintf(stderr, "It shows the Mock Turtle devices available on the system.\n\n");
fprintf(stderr, "-v show more information\n");
fprintf(stderr, "-h show this help\n");
fprintf(stderr, "\n");
......@@ -47,7 +52,7 @@ int main(int argc, char *argv[])
while ((c = getopt (argc, argv, "h:v")) != -1) {
switch (c) {
default:
help();
help(argv[0]);
break;
case 'v':
verbose++;
......
Markdown is supported
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