{ "set-session", cmd_set_session},
{ "version", cmd_version},
{ "calibrate", cmd_calibrate},
+ { "view", cmd_view},
{ NULL, NULL} /* Array closure */
};
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");
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;
}
}
/* 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;
}