Add git version string
[babeltrace.git] / cli / babeltrace-cfg-cli-args.c
index bd1bcc530ed07d3c4b8fc9b167dffb4158a1bcb0..3af66edf2274a76e0fe66a053f43a90d21e91491 100644 (file)
@@ -41,6 +41,7 @@
 #include "babeltrace-cfg.h"
 #include "babeltrace-cfg-cli-args.h"
 #include "babeltrace-cfg-cli-args-connect.h"
+#include "version.h"
 
 /*
  * Error printf() macro which prepends "Error: " the first time it's
@@ -729,7 +730,11 @@ end:
 static
 void print_version(void)
 {
-       puts("Babeltrace " VERSION);
+       if (GIT_VERSION[0] == '\0') {
+               puts("Babeltrace " VERSION);
+       } else {
+               puts("Babeltrace " VERSION  " - " GIT_VERSION);
+       }
 }
 
 /*
@@ -2604,7 +2609,7 @@ struct bt_config *bt_config_run_from_args(int argc, const char *argv[],
                        break;
                case OPT_RETRY_DURATION:
                        if (retry_duration < 0) {
-                               printf_err("--retry-duration option's argument must be positive or 0: %lld\n",
+                               printf_err("--retry-duration option's argument must be positive or 0: %ld\n",
                                        retry_duration);
                                goto error;
                        }
This page took 0.024372 seconds and 4 git commands to generate.