X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng%2Flttng.c;h=2df8b8740225afc831c5769779473c0db5140f51;hp=41232bef9e6e4a2efdc40f90ec9b70dff69ea76c;hb=4c6ac053271850d24b2eda44a78f066c332880e1;hpb=4900d3cd9c4accc131a6a79986151cf3e6236031 diff --git a/src/bin/lttng/lttng.c b/src/bin/lttng/lttng.c index 41232bef9..2df8b8740 100644 --- a/src/bin/lttng/lttng.c +++ b/src/bin/lttng/lttng.c @@ -90,7 +90,8 @@ static struct cmd_struct commands[] = { static void usage(FILE *ofp) { - fprintf(ofp, "LTTng Trace Control " VERSION " - " VERSION_NAME" - " GIT_VERSION "\n\n"); + fprintf(ofp, "LTTng Trace Control " VERSION " - " VERSION_NAME "%s\n\n", + GIT_VERSION[0] == '\0' ? "" : " - " GIT_VERSION); fprintf(ofp, "usage: lttng [OPTIONS] []\n"); fprintf(ofp, "\n"); fprintf(ofp, "Options:\n"); @@ -134,8 +135,9 @@ static void usage(FILE *ofp) static void version(FILE *ofp) { - fprintf(ofp, "%s (LTTng Trace Control) " VERSION" - " VERSION_NAME" - " GIT_VERSION "\n", - progname); + fprintf(ofp, "%s (LTTng Trace Control) " VERSION" - " VERSION_NAME "%s\n", + progname, + GIT_VERSION[0] == '\0' ? "" : " - " GIT_VERSION); } /*