X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng%2Flttng.c;h=2df8b8740225afc831c5769779473c0db5140f51;hp=41232bef9e6e4a2efdc40f90ec9b70dff69ea76c;hb=234170acd2ca985ff9023007eef52440601d8f12;hpb=456b8d40f14be07cca75a9e22ec77976c895d4d5 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); } /*