X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng%2Flttng.c;h=b9dea18e1952a7c735d529fb8e9da8b9c3f61fd0;hb=5df0452695e2e6a4c3640eaeff10742bbbc34652;hp=6b926954da8c29a53f36f0eea7a1fbea79752d38;hpb=8960e9cd5adb7e5cdaece135530a457cd65324dc;p=lttng-tools.git diff --git a/src/bin/lttng/lttng.c b/src/bin/lttng/lttng.c index 6b926954d..b9dea18e1 100644 --- a/src/bin/lttng/lttng.c +++ b/src/bin/lttng/lttng.c @@ -80,6 +80,8 @@ static struct cmd_struct commands[] = { { "calibrate", cmd_calibrate}, { "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 */ @@ -87,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] []\n"); fprintf(ofp, "\n"); fprintf(ofp, "Options:\n"); @@ -118,6 +120,8 @@ static void usage(FILE *ofp) fprintf(ofp, " stop Stop tracing\n"); 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"); @@ -127,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); } @@ -433,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; @@ -446,9 +453,17 @@ static int parse_args(int argc, char **argv) break; case OPT_SESSION_PATH: opt_sessiond_path = strdup(optarg); + if (!opt_sessiond_path) { + ret = -1; + goto error; + } break; case OPT_RELAYD_PATH: opt_relayd_path = strdup(optarg); + if (!opt_relayd_path) { + ret = -1; + goto error; + } break; case OPT_DUMP_OPTIONS: list_options(stdout);