Fix: saturate verbosity level to 3
[lttng-tools.git] / src / bin / lttng / lttng.c
index c4443e7fb22c8e60d285bcb10dc1952f6e82c1a1..d4d40f07722ef8aad0097164af92456454418f90 100644 (file)
@@ -81,6 +81,7 @@ static struct cmd_struct commands[] =  {
        { "view", cmd_view},
        { "snapshot", cmd_snapshot},
        { "save", cmd_save},
+       { "load", cmd_load},
        { "enable-consumer", cmd_enable_consumer}, /* OBSOLETE */
        { "disable-consumer", cmd_disable_consumer}, /* OBSOLETE */
        { NULL, NULL}   /* Array closure */
@@ -88,7 +89,7 @@ static struct cmd_struct commands[] =  {
 
 static void usage(FILE *ofp)
 {
-       fprintf(ofp, "LTTng Trace Control " VERSION" - " VERSION_NAME"\n\n");
+       fprintf(ofp, "LTTng Trace Control " FULL_VERSION" - " VERSION_NAME"\n\n");
        fprintf(ofp, "usage: lttng [OPTIONS] <COMMAND> [<ARGS>]\n");
        fprintf(ofp, "\n");
        fprintf(ofp, "Options:\n");
@@ -120,6 +121,7 @@ static void usage(FILE *ofp)
        fprintf(ofp, "    version           Show version information\n");
        fprintf(ofp, "    view              Start trace viewer\n");
        fprintf(ofp, "    save              Save session configuration\n");
+       fprintf(ofp, "    load              Load session configuration\n");
        fprintf(ofp, "\n");
        fprintf(ofp, "Each command also has its own -h, --help option.\n");
        fprintf(ofp, "\n");
@@ -129,7 +131,7 @@ static void usage(FILE *ofp)
 
 static void version(FILE *ofp)
 {
-       fprintf(ofp, "%s (LTTng Trace Control) " VERSION" - " VERSION_NAME"\n",
+       fprintf(ofp, "%s (LTTng Trace Control) " FULL_VERSION" - " VERSION_NAME"\n",
                        progname);
 }
 
@@ -435,7 +437,10 @@ static int parse_args(int argc, char **argv)
                        ret = 0;
                        goto end;
                case 'v':
-                       lttng_opt_verbose += 1;
+                       /* There is only 3 possible level of verbosity. (-vvv) */
+                       if (lttng_opt_verbose < 3) {
+                               lttng_opt_verbose += 1;
+                       }
                        break;
                case 'q':
                        lttng_opt_quiet = 1;
This page took 0.025566 seconds and 4 git commands to generate.