X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng%2Flttng.c;h=1349c20a726f0cb2b51a88d25c113928522f147c;hp=438320d97616bca6f6ac3bbe4280e4a0d61ddf55;hb=ca4537d385628d3568a918409d909d3042ca7a38;hpb=ae8564917fa3cb3497ec17951d8ac0ee28de9c81 diff --git a/src/bin/lttng/lttng.c b/src/bin/lttng/lttng.c index 438320d97..1349c20a7 100644 --- a/src/bin/lttng/lttng.c +++ b/src/bin/lttng/lttng.c @@ -76,6 +76,7 @@ static struct cmd_struct commands[] = { { "set-session", cmd_set_session}, { "version", cmd_version}, { "calibrate", cmd_calibrate}, + { "view", cmd_view}, { NULL, NULL} /* Array closure */ }; @@ -108,6 +109,7 @@ static void usage(FILE *ofp) fprintf(ofp, " start Start tracing\n"); fprintf(ofp, " stop Stop tracing\n"); fprintf(ofp, " version Show version information\n"); + fprintf(ofp, " view Start trace viewer\n"); fprintf(ofp, "\n"); fprintf(ofp, "Each command also has its own -h, --help option.\n"); fprintf(ofp, "\n"); @@ -399,7 +401,8 @@ static int check_args_no_sessiond(int argc, char **argv) strncmp(argv[i], "--h", sizeof("--h")) == 0 || strncmp(argv[i], "--list-options", sizeof("--list-options")) == 0 || strncmp(argv[i], "--list-commands", sizeof("--list-commands")) == 0 || - strncmp(argv[i], "version", sizeof("version"))) { + strncmp(argv[i], "version", sizeof("version")) == 0 || + strncmp(argv[i], "view", sizeof("view")) == 0) { return 1; } } @@ -465,12 +468,14 @@ static int parse_args(int argc, char **argv) /* Spawn session daemon if needed */ if (opt_no_sessiond == 0 && check_args_no_sessiond(argc, argv) == 0 && (check_sessiond() < 0)) { + ret = 1; goto error; } /* No leftovers, print usage and quit */ if ((argc - optind) == 0) { usage(stderr); + ret = 1; goto error; }